From 9a2938ff3e047bc3d579d4f4d375900249652dfd Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 5 May 2022 13:23:06 -0500 Subject: [PATCH] GUI: fix values button working as notes --- src/engine/platform/sound/ymfm/ymfm_opz.cpp | 12 +++++++++--- src/gui/gui.cpp | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/engine/platform/sound/ymfm/ymfm_opz.cpp b/src/engine/platform/sound/ymfm/ymfm_opz.cpp index cc7a7c9d5..6408ae33a 100644 --- a/src/engine/platform/sound/ymfm/ymfm_opz.cpp +++ b/src/engine/platform/sound/ymfm/ymfm_opz.cpp @@ -70,16 +70,24 @@ // OPZ supports a "fixed frequency" mode for each operator, with a 3-bit // range and 4-bit frequency value, plus a 1-bit enable. Not sure how that // works at all, so it's not implemented. +// note by tildearrow: +// - I have verified behavior of this mode against real hardware. +// after applying a small fix on the existing early implementation, it matches hardware. +// this means fixed frequency is fully implemented and working. // // There are also several mystery fields in the operators which I have no // clue about: "fine" (4 bits), "eg_shift" (2 bits), and "rev" (3 bits). // eg_shift is some kind of envelope generator effect, but how it works is // unknown. +// note by tildearrow: +// - behavior of "fine" is now confirmed and matches hardware. // // Also, according to the site above, the panning controls are changed from // OPM, with a "mono" bit and only one control bit for the right channel. // Current implementation is just a guess. // +// additional modifications by tildearrow for Furnace +// namespace ymfm { @@ -409,9 +417,6 @@ uint32_t opz_registers::lfo_am_offset(uint32_t choffs) const void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata_cache &cache) { - // TODO: how does fixed frequency mode work? appears to be enabled by - // op_fix_mode(), and controlled by op_fix_range(), op_fix_frequency() - // TODO: what is op_rev()? // set up the easy stuff @@ -468,6 +473,7 @@ void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata cache.eg_rate[EG_REVERB] = std::min(effective_rate(reverb * 4 + 2, ksrval), cache.eg_rate[EG_REVERB]); // set the envelope shift; TX81Z manual says operator 1 shift is fixed at "off" + // TODO: change 0 to 3? operators are in reverse order in TX81Z cache.eg_shift = ((opoffs & 0x18) == 0) ? 0 : op_eg_shift(opoffs); } diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 3e20f4c32..72a575fbe 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -2091,7 +2091,7 @@ void FurnaceGUI::editOptions(bool topMenu) { } ImGui::SameLine(); if (ImGui::Button("Values")) { - doTranspose(transposeAmount,opMaskTransposeNote); + doTranspose(transposeAmount,opMaskTransposeValue); ImGui::CloseCurrentPopup(); }