From 54934dcfc9639eeb48ff18c7f3fef86a10c6ec42 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 21 Aug 2023 23:57:07 -0500 Subject: [PATCH] dev167 - fix TL macro previously, 127 mapped to TL 0 but now 127 maps to TL 127 yeah, the graph will look inverted I know... --- src/engine/engine.h | 4 ++-- src/engine/instrument.cpp | 16 ++++++++++++++++ src/engine/platform/arcade.cpp | 2 +- src/engine/platform/genesis.cpp | 2 +- src/engine/platform/genesisext.cpp | 2 +- src/engine/platform/opl.cpp | 2 +- src/engine/platform/opll.cpp | 2 +- src/engine/platform/tx81z.cpp | 2 +- src/engine/platform/ym2203.cpp | 2 +- src/engine/platform/ym2203ext.cpp | 2 +- src/engine/platform/ym2608.cpp | 2 +- src/engine/platform/ym2608ext.cpp | 2 +- src/engine/platform/ym2610.cpp | 2 +- src/engine/platform/ym2610b.cpp | 2 +- src/engine/platform/ym2610bext.cpp | 2 +- src/engine/platform/ym2610ext.cpp | 2 +- 16 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/engine/engine.h b/src/engine/engine.h index e5538f72..3a297217 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -56,8 +56,8 @@ #define DIV_UNSTABLE -#define DIV_VERSION "dev166" -#define DIV_ENGINE_VERSION 166 +#define DIV_VERSION "dev167" +#define DIV_ENGINE_VERSION 167 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 diff --git a/src/engine/instrument.cpp b/src/engine/instrument.cpp index 3931a6f5..34a77f5e 100644 --- a/src/engine/instrument.cpp +++ b/src/engine/instrument.cpp @@ -2261,6 +2261,13 @@ void DivInstrument::readFeatureOx(SafeReader& reader, int op, short version) { } break; } + + // <167 TL macro compat + if (macroCode==6 && version<167) { + for (int i=0; ilen; i++) { + target->val[i]^=0x7f; + } + } } READ_FEAT_END; @@ -3319,6 +3326,15 @@ DivDataErrors DivInstrument::readInsDataOld(SafeReader &reader, short version) { } } + // <167 TL macro compat + if (version<167) { + for (int i=0; i<4; i++) { + for (int j=0; j