From 1436da8a6620153abcbc6f48881dd98ccd941814 Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 6 Mar 2023 08:38:41 +0900 Subject: [PATCH] Add debug status support for SM8521 --- src/gui/debug.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/gui/debug.cpp b/src/gui/debug.cpp index c46002c0..04d84c11 100644 --- a/src/gui/debug.cpp +++ b/src/gui/debug.cpp @@ -51,6 +51,7 @@ #include "../engine/platform/pcmdac.h" #include "../engine/platform/k007232.h" #include "../engine/platform/ga20.h" +#include "../engine/platform/sm8521.h" #include "../engine/platform/dummy.h" #define COMMON_CHIP_DEBUG \ @@ -528,6 +529,14 @@ void putDispatchChip(void* data, int type) { COMMON_CHIP_DEBUG_BOOL; break; } + case DIV_SYSTEM_SM8521: { + DivPlatformSM8521* ch=(DivPlatformSM8521*)data; + ImGui::Text("> SM8521"); + COMMON_CHIP_DEBUG; + COMMON_CHIP_DEBUG_BOOL; + ImGui::TextColored(ch->antiClickEnabled?colorOn:colorOff,">> AntiClickEnabled"); + break; + } default: ImGui::Text("Unimplemented chip! Help!"); break; @@ -1047,6 +1056,18 @@ void putDispatchChan(void* data, int chanNum, int type) { ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); break; } + case DIV_SYSTEM_SM8521: { + DivPlatformSM8521::Channel* ch=(DivPlatformSM8521::Channel*)data; + ImGui::Text("> SM8521"); + COMMON_CHAN_DEBUG; + ImGui::Text("* AntiClick:"); + ImGui::Text(" - periodCount: %d",ch->antiClickPeriodCount); + ImGui::Text(" - wavePos: %d",ch->antiClickWavePos); + ImGui::Text("- wave: %d",ch->wave); + COMMON_CHAN_DEBUG_BOOL; + ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged"); + break; + } default: ImGui::Text("Unimplemented chip! Help!"); break;