From 9447442fede8c999515a02a8521b3d042e8b286c Mon Sep 17 00:00:00 2001 From: freq-mod Date: Wed, 27 Jul 2022 16:09:36 +0200 Subject: [PATCH 1/6] Update waveform editor height/width guide --- src/gui/waveEdit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/waveEdit.cpp b/src/gui/waveEdit.cpp index 4d8f197da..ac06bcb7c 100644 --- a/src/gui/waveEdit.cpp +++ b/src/gui/waveEdit.cpp @@ -152,7 +152,7 @@ void FurnaceGUI::drawWaveEdit() { ImGui::TableNextColumn(); ImGui::Text("Width"); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine and WonderSwan\n- 64 on FDS\n- 128 on X1-010\nany other widths will be scaled during playback."); + ImGui::SetTooltip("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine, SCC, Konami Bubble System, Namco WSG and WonderSwan\n- 64 on FDS\n- 128 on X1-010\nany other widths will be scaled during playback."); } ImGui::SameLine(); ImGui::SetNextItemWidth(96.0f*dpiScale); @@ -166,7 +166,7 @@ void FurnaceGUI::drawWaveEdit() { ImGui::SameLine(); ImGui::Text("Height"); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("use a height of:\n- 15 for Game Boy, WonderSwan, X1-010 Envelope shape and N163\n- 31 for PC Engine\n- 63 for FDS\n- 255 for X1-010\nany other heights will be scaled during playback."); + ImGui::SetTooltip("use a height of:\n- 15 for Game Boy, WonderSwan, Namco WSG, Konami Bubble System, X1-010 Envelope shape and N163\n- 31 for PC Engine\n- 63 for FDS\n- 255 for X1-010 and SCC\nany other heights will be scaled during playback."); } ImGui::SameLine(); ImGui::SetNextItemWidth(96.0f*dpiScale); From 717d99d65058495f38cf76ca7c754732bd9bc46d Mon Sep 17 00:00:00 2001 From: brickblock369 <59150779+brickblock369@users.noreply.github.com> Date: Wed, 3 Aug 2022 21:25:17 +0900 Subject: [PATCH 2/6] Two new OPL instruments --- .../OPL/Low Overdriven Guitar (Sine Carrier).fui | Bin 0 -> 1697 bytes .../Low Overdriven Guitar (Square Carrier).fui | Bin 0 -> 1699 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 instruments/OPL/Low Overdriven Guitar (Sine Carrier).fui create mode 100644 instruments/OPL/Low Overdriven Guitar (Square Carrier).fui diff --git a/instruments/OPL/Low Overdriven Guitar (Sine Carrier).fui b/instruments/OPL/Low Overdriven Guitar (Sine Carrier).fui new file mode 100644 index 0000000000000000000000000000000000000000..9fae9177ba4ca83fca5f3e3d7b3be6d46862832f GIT binary patch literal 1697 zcmdOOD=o@POioqE%quP_($h_6U|>)HVi@rB3l6DdV_-;U;A8N~FIVs{OD#$%$}CIG zQ*bZMEJ-X<&Z;Q zAg7QE(9I&mhuA}&jfBibmmdjsq5FBb^9iL>O8rmBe3<;GJ*Xi73l|0k2et)l4a^K6 fX$A#mgg6cssxhSVa2QLZFy4ZQpPzvNgmD1?J^VSR literal 0 HcmV?d00001 diff --git a/instruments/OPL/Low Overdriven Guitar (Square Carrier).fui b/instruments/OPL/Low Overdriven Guitar (Square Carrier).fui new file mode 100644 index 0000000000000000000000000000000000000000..dfb5eba1eb3bf90aa25522af55374d259e28f6d4 GIT binary patch literal 1699 zcmdOOD=o@POioqE%quP_($h_6U|>)HVi@rB3l6DfV_-;U;A8N~FIVs{OD#$%$}CIG zQ*bZMEJ-X<&8>8h~r?P8bdk{hp|Ko<1L8z`572M7#9El3xPU| literal 0 HcmV?d00001 From b030f8285d45c782c427b9ed8146fb47d6633d1e Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Thu, 4 Aug 2022 17:33:36 +1000 Subject: [PATCH 3/6] Bugfix for OPM file load - correctly handle AM-ENA where value is arbitrarily nonzero --- src/engine/fileOpsIns.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index b7ca22c1e..369b1238f 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -1262,7 +1262,7 @@ void DivEngine::loadOPM(SafeReader& reader, std::vector& ret, St patchNameRead = lfoRead = characteristicRead = m1Read = c1Read = m2Read = c2Read = false; newPatch = NULL; }; - auto readIntStrWithinRange = [](String&& input, int limitLow, int limitHigh) -> int { + auto readIntStrWithinRange = [](String&& input, int limitLow = INT_MIN, int limitHigh = INT_MAX) -> int { int x = std::stoi(input.c_str()); if (x > limitHigh || x < limitLow) { throw std::invalid_argument(fmt::sprintf("%s is out of bounds of range [%d..%d]", input, limitLow, limitHigh)); @@ -1280,7 +1280,7 @@ void DivEngine::loadOPM(SafeReader& reader, std::vector& ret, St op.mult = readIntStrWithinRange(reader.readStringToken(), 0, 15); op.dt = fmDtRegisterToFurnace(readIntStrWithinRange(reader.readStringToken(), 0, 7)); op.dt2 = readIntStrWithinRange(reader.readStringToken(), 0, 3); - op.am = readIntStrWithinRange(reader.readStringToken(), 0, 1); + op.am = readIntStrWithinRange(reader.readStringToken(), 0) > 0 ? 1 : 0; }; auto seekGroupValStart = [](SafeReader& reader, int pos) { // Seek to position then move to next ':' character From edb0f51131215cfb0b3b53b54c566e7a6b5ffef7 Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Thu, 4 Aug 2022 17:43:42 +1000 Subject: [PATCH 4/6] stdint required --- src/engine/fileOpsIns.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index 369b1238f..e5ea58abc 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -21,6 +21,7 @@ #include "../ta-log.h" #include "../fileutils.h" #include +#include enum DivInsFormats { DIV_INSFORMAT_DMP, From 810eabca99851f6b769540c17169e0ee0bf79491 Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Thu, 4 Aug 2022 17:50:33 +1000 Subject: [PATCH 5/6] derp limits --- src/engine/fileOpsIns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index e5ea58abc..54e0eefc6 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -21,7 +21,7 @@ #include "../ta-log.h" #include "../fileutils.h" #include -#include +#include enum DivInsFormats { DIV_INSFORMAT_DMP, From a84129621937389d444cf09fe61544df8194a627 Mon Sep 17 00:00:00 2001 From: freq-mod <32672779+freq-mod@users.noreply.github.com> Date: Sat, 6 Aug 2022 17:50:15 +0200 Subject: [PATCH 6/6] Y8950: PCM -> ADPCM also where the f is my write access --- src/engine/sysDef.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index 740854071..c5541baa3 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -1850,8 +1850,8 @@ void DivEngine::registerSystems() { sysDefs[DIV_SYSTEM_Y8950]=new DivSysDef( "Yamaha Y8950", NULL, 0xb2, 0, 10, true, false, 0x151, false, "like OPL but with an ADPCM channel.", - {"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "FM 7", "FM 8", "FM 9", "PCM"}, - {"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "PCM"}, + {"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "FM 7", "FM 8", "FM 9", "ADPCM"}, + {"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "P"}, {DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PCM}, {DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_AMIGA}, {}, @@ -1862,8 +1862,8 @@ void DivEngine::registerSystems() { sysDefs[DIV_SYSTEM_Y8950_DRUMS]=new DivSysDef( "Yamaha Y8950 with drums", NULL, 0xb3, 0, 12, true, false, 0x151, false, "the Y8950 chip, in drums mode.", - {"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "Kick/FM 7", "Snare", "Tom", "Top", "HiHat", "PCM"}, - {"F1", "F2", "F3", "F4", "F5", "F6", "BD", "SD", "TM", "TP", "HH", "PCM"}, + {"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "Kick/FM 7", "Snare", "Tom", "Top", "HiHat", "ADPCM"}, + {"F1", "F2", "F3", "F4", "F5", "F6", "BD", "SD", "TM", "TP", "HH", "P"}, {DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_PCM}, {DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL_DRUMS, DIV_INS_OPL_DRUMS, DIV_INS_OPL_DRUMS, DIV_INS_OPL_DRUMS, DIV_INS_AMIGA}, {DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_NULL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_OPL, DIV_INS_NULL},