From 6344a1d23f0721b19ec86b90695cc4fe05e98d32 Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Sun, 14 Aug 2022 16:09:31 +1000 Subject: [PATCH] Reported bug - 2nd 2op pair did not read ALG and FB registers to instrument patch --- src/engine/fileOpsIns.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index 54e0eefc6..62c3a1d8a 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -733,6 +733,8 @@ void DivEngine::loadOPLI(SafeReader& reader, std::vector& ret, S ins = new DivInstrument; ins->type = DIV_INS_OPL; ins->name = fmt::sprintf("%s (2)", insName); + ins->fm.alg = (feedConnect2nd & 0x1); + ins->fm.fb = ((feedConnect2nd >> 1) & 0xF); for (int i : {1,0}) { readOpliOp(reader, ins->fm.op[i]); } @@ -1498,6 +1500,8 @@ void DivEngine::loadWOPL(SafeReader& reader, std::vector& ret, S ins = new DivInstrument; ins->type = DIV_INS_OPL; ins->name = fmt::sprintf("%s (2)", insName); + ins->fm.alg = (feedConnect2nd & 0x1); + ins->fm.fb = ((feedConnect2nd >> 1) & 0xF); for (int i : {1,0}) { patchSum += readWoplOp(reader, ins->fm.op[i]); }