| 1 |
/** |
| 2 |
* Furnace Tracker - multi-system chiptune tracker |
| 3 |
* Copyright (C) 2021-2025 tildearrow and contributors |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or |
| 8 |
* (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License along |
| 16 |
* with this program; if not, write to the Free Software Foundation, Inc., |
| 17 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
#include "debug.h" |
| 21 |
#include "imgui.h" |
| 22 |
#include "../engine/platform/fmsharedbase.h" |
| 23 |
#include "../engine/platform/genesis.h" |
| 24 |
#include "../engine/platform/genesisext.h" |
| 25 |
#include "../engine/platform/sms.h" |
| 26 |
#include "../engine/platform/gb.h" |
| 27 |
#include "../engine/platform/pce.h" |
| 28 |
#include "../engine/platform/nes.h" |
| 29 |
#include "../engine/platform/c64.h" |
| 30 |
#include "../engine/platform/arcade.h" |
| 31 |
#include "../engine/platform/segapcm.h" |
| 32 |
#include "../engine/platform/ym2203.h" |
| 33 |
#include "../engine/platform/ym2203ext.h" |
| 34 |
#include "../engine/platform/ym2608.h" |
| 35 |
#include "../engine/platform/ym2608ext.h" |
| 36 |
#include "../engine/platform/ym2610.h" |
| 37 |
#include "../engine/platform/ym2610ext.h" |
| 38 |
#include "../engine/platform/ym2610b.h" |
| 39 |
#include "../engine/platform/ym2610bext.h" |
| 40 |
#include "../engine/platform/ay.h" |
| 41 |
#include "../engine/platform/ay8930.h" |
| 42 |
#include "../engine/platform/tia.h" |
| 43 |
#include "../engine/platform/saa.h" |
| 44 |
#include "../engine/platform/amiga.h" |
| 45 |
#include "../engine/platform/qsound.h" |
| 46 |
#include "../engine/platform/x1_010.h" |
| 47 |
#include "../engine/platform/n163.h" |
| 48 |
#include "../engine/platform/vrc6.h" |
| 49 |
#include "../engine/platform/es5506.h" |
| 50 |
#include "../engine/platform/lynx.h" |
| 51 |
#include "../engine/platform/pcmdac.h" |
| 52 |
#include "../engine/platform/k007232.h" |
| 53 |
#include "../engine/platform/ga20.h" |
| 54 |
#include "../engine/platform/supervision.h" |
| 55 |
#include "../engine/platform/sm8521.h" |
| 56 |
#include "../engine/platform/pv1000.h" |
| 57 |
#include "../engine/platform/k053260.h" |
| 58 |
#include "../engine/platform/c140.h" |
| 59 |
#include "../engine/platform/msm6295.h" |
| 60 |
#include "../engine/platform/dummy.h" |
| 61 |
|
| 62 |
#define COMMON_CHIP_DEBUG \ |
| 63 |
ImGui::Text("- rate: %d",ch->rate); \ |
| 64 |
ImGui::Text("- chipClock: %d",ch->chipClock); |
| 65 |
|
| 66 |
#define FM_CHIP_DEBUG \ |
| 67 |
COMMON_CHIP_DEBUG; \ |
| 68 |
ImGui::Text("- delay: %d",ch->delay); |
| 69 |
|
| 70 |
#define FM_OPN_CHIP_DEBUG \ |
| 71 |
FM_CHIP_DEBUG; \ |
| 72 |
ImGui::Text("- fmFreqBase: %.f",ch->fmFreqBase); \ |
| 73 |
ImGui::Text("- fmDivBase: %d",ch->fmDivBase); \ |
| 74 |
ImGui::Text("- ayDiv: %d",ch->ayDiv); \ |
| 75 |
ImGui::Text("- extChanOffs: %d",ch->extChanOffs); \ |
| 76 |
ImGui::Text("- psgChanOffs: %d",ch->psgChanOffs); \ |
| 77 |
ImGui::Text("- adpcmAChanOffs: %d",ch->adpcmAChanOffs); \ |
| 78 |
ImGui::Text("- adpcmBChanOffs: %d",ch->adpcmBChanOffs); \ |
| 79 |
|
| 80 |
#define COMMON_CHIP_DEBUG_BOOL \ |
| 81 |
ImGui::TextColored(ch->skipRegisterWrites?colorOn:colorOff,">> SkipRegisterWrites"); \ |
| 82 |
ImGui::TextColored(ch->dumpWrites?colorOn:colorOff,">> DumpWrites"); |
| 83 |
|
| 84 |
#define FM_CHIP_DEBUG_BOOL \ |
| 85 |
COMMON_CHIP_DEBUG_BOOL; \ |
| 86 |
ImGui::TextColored(ch->lastBusy?colorOn:colorOff,">> LastBusy"); \ |
| 87 |
|
| 88 |
#define FM_OPN_CHIP_DEBUG_BOOL \ |
| 89 |
FM_CHIP_DEBUG_BOOL; \ |
| 90 |
ImGui::TextColored(ch->extSys?colorOn:colorOff,">> ExtSys"); \ |
| 91 |
|
| 92 |
#define GENESIS_CHIP_DEBUG \ |
| 93 |
DivPlatformGenesis* ch=(DivPlatformGenesis*)data; \ |
| 94 |
ImGui::Text("> YM2612"); \ |
| 95 |
FM_OPN_CHIP_DEBUG; \ |
| 96 |
ImGui::Text("- lfoValue: %d",ch->lfoValue); \ |
| 97 |
ImGui::Text("- softPCMTimer: %d",ch->softPCMTimer); \ |
| 98 |
FM_OPN_CHIP_DEBUG_BOOL; \ |
| 99 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); \ |
| 100 |
ImGui::TextColored(ch->softPCM?colorOn:colorOff,">> SoftPCM"); \ |
| 101 |
ImGui::TextColored(ch->useYMFM?colorOn:colorOff,">> UseYMFM"); \ |
| 102 |
|
| 103 |
#define OPNB_CHIP_DEBUG \ |
| 104 |
FM_OPN_CHIP_DEBUG; \ |
| 105 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); \ |
| 106 |
ImGui::Text("- writeADPCMAOff: %d",ch->writeADPCMAOff); \ |
| 107 |
ImGui::Text("- writeADPCMAOn: %d",ch->writeADPCMAOn); \ |
| 108 |
ImGui::Text("- globalADPCMAVolume: %d",ch->globalADPCMAVolume); \ |
| 109 |
FM_OPN_CHIP_DEBUG_BOOL; \ |
| 110 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); |
| 111 |
|
| 112 |
#define SMS_CHIP_DEBUG \ |
| 113 |
DivPlatformSMS* sms=(DivPlatformSMS*)data; \ |
| 114 |
ImGui::Text("> SMS"); \ |
| 115 |
ImGui::Text("- rate: %d",sms->rate); \ |
| 116 |
ImGui::Text("- chipClock: %d",sms->chipClock); \ |
| 117 |
ImGui::Text("- lastPan: %d",sms->lastPan); \ |
| 118 |
ImGui::Text("- oldValue: %d",sms->oldValue); \ |
| 119 |
ImGui::Text("- snNoiseMode: %d",sms->snNoiseMode); \ |
| 120 |
ImGui::Text("- divider: %d",sms->divider); \ |
| 121 |
ImGui::Text("- toneDivider: %.f",sms->toneDivider); \ |
| 122 |
ImGui::Text("- noiseDivider: %.f",sms->noiseDivider); \ |
| 123 |
ImGui::TextColored(sms->skipRegisterWrites?colorOn:colorOff,">> SkipRegisterWrites"); \ |
| 124 |
ImGui::TextColored(sms->dumpWrites?colorOn:colorOff,">> DumpWrites"); \ |
| 125 |
ImGui::TextColored(sms->updateSNMode?colorOn:colorOff,">> UpdateSNMode"); \ |
| 126 |
ImGui::TextColored(sms->resetPhase?colorOn:colorOff,">> ResetPhase"); \ |
| 127 |
ImGui::TextColored(sms->isRealSN?colorOn:colorOff,">> IsRealSN"); \ |
| 128 |
ImGui::TextColored(sms->stereo?colorOn:colorOff,">> Stereo"); \ |
| 129 |
ImGui::TextColored(sms->nuked?colorOn:colorOff,">> Nuked"); |
| 130 |
|
| 131 |
|
| 132 |
#define COMMON_CHAN_DEBUG \ |
| 133 |
ImGui::Text("* freq: %d",ch->freq); \ |
| 134 |
ImGui::Text(" - base: %d",ch->baseFreq); \ |
| 135 |
ImGui::Text(" - pitch: %d",ch->pitch); \ |
| 136 |
ImGui::Text(" - pitch2: %d",ch->pitch2); \ |
| 137 |
ImGui::Text("- note: %d",ch->note); \ |
| 138 |
ImGui::Text("- ins: %d",ch->ins); \ |
| 139 |
ImGui::Text("- vol: %.2x",ch->vol); \ |
| 140 |
ImGui::Text("- outVol: %.2x",ch->outVol); |
| 141 |
|
| 142 |
#define COMMON_CHAN_DEBUG_BOOL \ |
| 143 |
ImGui::TextColored(ch->active?colorOn:colorOff,">> Active"); \ |
| 144 |
ImGui::TextColored(ch->insChanged?colorOn:colorOff,">> InsChanged"); \ |
| 145 |
ImGui::TextColored(ch->freqChanged?colorOn:colorOff,">> FreqChanged"); \ |
| 146 |
ImGui::TextColored(ch->keyOn?colorOn:colorOff,">> KeyOn"); \ |
| 147 |
ImGui::TextColored(ch->keyOff?colorOn:colorOff,">> KeyOff"); \ |
| 148 |
ImGui::TextColored(ch->portaPause?colorOn:colorOff,">> PortaPause"); \ |
| 149 |
ImGui::TextColored(ch->inPorta?colorOn:colorOff,">> InPorta"); |
| 150 |
|
| 151 |
#define GENESIS_CHAN_DEBUG \ |
| 152 |
DivPlatformGenesis::Channel* ch=(DivPlatformGenesis::Channel*)data; \ |
| 153 |
ImGui::Text("> YM2612"); \ |
| 154 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 155 |
COMMON_CHAN_DEBUG; \ |
| 156 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 157 |
ImGui::Text("* DAC:"); \ |
| 158 |
ImGui::Text(" - period: %d",ch->dacPeriod); \ |
| 159 |
ImGui::Text(" - rate: %d",ch->dacRate); \ |
| 160 |
ImGui::Text(" - pos: %d",ch->dacPos); \ |
| 161 |
ImGui::Text(" - sample: %d",ch->dacSample); \ |
| 162 |
ImGui::Text(" - delay: %d",ch->dacDelay); \ |
| 163 |
ImGui::Text(" - output: %d",ch->dacOutput); \ |
| 164 |
ImGui::Text("- pan: %x",ch->pan); \ |
| 165 |
ImGui::Text("- opMask: %x",ch->opMask); \ |
| 166 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); \ |
| 167 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 168 |
ImGui::TextColored(ch->furnaceDac?colorOn:colorOff,">> FurnaceDAC"); \ |
| 169 |
ImGui::TextColored(ch->hardReset?colorOn:colorOff,">> hardReset"); \ |
| 170 |
ImGui::TextColored(ch->opMaskChanged?colorOn:colorOff,">> opMaskChanged"); \ |
| 171 |
ImGui::TextColored(ch->dacMode?colorOn:colorOff,">> DACMode"); \ |
| 172 |
ImGui::TextColored(ch->dacDirection?colorOn:colorOff,">> DACDirection"); |
| 173 |
|
| 174 |
#define GENESIS_OPCHAN_DEBUG \ |
| 175 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; \ |
| 176 |
ImGui::Text("> YM2612 (per operator)"); \ |
| 177 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 178 |
COMMON_CHAN_DEBUG; \ |
| 179 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 180 |
ImGui::Text("- pan: %x",ch->pan); \ |
| 181 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 182 |
ImGui::TextColored(ch->mask?colorOn:colorOff,">> Mask"); |
| 183 |
|
| 184 |
#define SMS_CHAN_DEBUG \ |
| 185 |
DivPlatformSMS::Channel* ch=(DivPlatformSMS::Channel*)data; \ |
| 186 |
ImGui::Text("> SMS"); \ |
| 187 |
COMMON_CHAN_DEBUG; \ |
| 188 |
COMMON_CHAN_DEBUG_BOOL; |
| 189 |
|
| 190 |
#define OPN_CHAN_DEBUG \ |
| 191 |
DivPlatformOPN::OPNChannel* ch=(DivPlatformOPN::OPNChannel*)data; \ |
| 192 |
ImGui::Text("> YM2203"); \ |
| 193 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 194 |
COMMON_CHAN_DEBUG; \ |
| 195 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 196 |
ImGui::Text("* PSG:"); \ |
| 197 |
ImGui::Text(" - psgMode: %d",ch->psgMode); \ |
| 198 |
ImGui::Text(" - autoEnvNum: %d",ch->autoEnvNum); \ |
| 199 |
ImGui::Text(" - autoEnvDen: %d",ch->autoEnvDen); \ |
| 200 |
ImGui::Text("- sample: %d",ch->sample); \ |
| 201 |
ImGui::Text("- opMask: %x",ch->opMask); \ |
| 202 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 203 |
ImGui::TextColored(ch->hardReset?colorOn:colorOff,">> hardReset"); \ |
| 204 |
ImGui::TextColored(ch->opMaskChanged?colorOn:colorOff,">> opMaskChanged"); \ |
| 205 |
ImGui::TextColored(ch->furnacePCM?colorOn:colorOff,">> FurnacePCM"); |
| 206 |
|
| 207 |
#define OPN_OPCHAN_DEBUG \ |
| 208 |
DivPlatformOPN::OPNOpChannel* ch=(DivPlatformOPN::OPNOpChannel*)data; \ |
| 209 |
ImGui::Text("> YM2203 (per operator)"); \ |
| 210 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 211 |
COMMON_CHAN_DEBUG; \ |
| 212 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 213 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 214 |
ImGui::TextColored(ch->mask?colorOn:colorOff,">> Mask"); |
| 215 |
|
| 216 |
#define OPNB_CHAN_DEBUG \ |
| 217 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 218 |
COMMON_CHAN_DEBUG; \ |
| 219 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 220 |
ImGui::Text("* PSG:"); \ |
| 221 |
ImGui::Text(" - psgMode: %d",ch->psgMode); \ |
| 222 |
ImGui::Text(" - autoEnvNum: %d",ch->autoEnvNum); \ |
| 223 |
ImGui::Text(" - autoEnvDen: %d",ch->autoEnvDen); \ |
| 224 |
ImGui::Text("- sample: %d",ch->sample); \ |
| 225 |
ImGui::Text("- pan: %x",ch->pan); \ |
| 226 |
ImGui::Text("- opMask: %x",ch->opMask); \ |
| 227 |
ImGui::Text("- macroVolMul: %x",ch->macroVolMul); \ |
| 228 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 229 |
ImGui::TextColored(ch->hardReset?colorOn:colorOff,">> hardReset"); \ |
| 230 |
ImGui::TextColored(ch->opMaskChanged?colorOn:colorOff,">> opMaskChanged"); \ |
| 231 |
ImGui::TextColored(ch->furnacePCM?colorOn:colorOff,">> FurnacePCM"); |
| 232 |
|
| 233 |
#define OPNB_OPCHAN_DEBUG \ |
| 234 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); \ |
| 235 |
COMMON_CHAN_DEBUG; \ |
| 236 |
ImGui::Text("- portaPauseFreq: %d",ch->portaPauseFreq); \ |
| 237 |
ImGui::Text("- pan: %x",ch->pan); \ |
| 238 |
COMMON_CHAN_DEBUG_BOOL; \ |
| 239 |
ImGui::TextColored(ch->mask?colorOn:colorOff,">> Mask"); |
| 240 |
|
| 241 |
void putDispatchChip(void* data, int type) { |
| 242 |
ImVec4 colorOn=ImVec4(1.0f,1.0f,0.0f,1.0f); |
| 243 |
ImVec4 colorOff=ImVec4(0.3f,0.3f,0.3f,1.0f); |
| 244 |
switch (type) { |
| 245 |
case DIV_SYSTEM_YM2612: |
| 246 |
case DIV_SYSTEM_YM2612_EXT: |
| 247 |
case DIV_SYSTEM_YM2612_DUALPCM: |
| 248 |
case DIV_SYSTEM_YM2612_DUALPCM_EXT: { |
| 249 |
GENESIS_CHIP_DEBUG; |
| 250 |
break; |
| 251 |
} |
| 252 |
case DIV_SYSTEM_GENESIS: |
| 253 |
case DIV_SYSTEM_GENESIS_EXT: { |
| 254 |
GENESIS_CHIP_DEBUG; |
| 255 |
SMS_CHIP_DEBUG; |
| 256 |
break; |
| 257 |
} |
| 258 |
case DIV_SYSTEM_SMS: { |
| 259 |
SMS_CHIP_DEBUG; |
| 260 |
break; |
| 261 |
} |
| 262 |
case DIV_SYSTEM_YM2203: |
| 263 |
case DIV_SYSTEM_YM2203_EXT: { |
| 264 |
DivPlatformYM2203* ch=(DivPlatformYM2203*)data; |
| 265 |
ImGui::Text("> YM2203"); |
| 266 |
FM_OPN_CHIP_DEBUG; |
| 267 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 268 |
ImGui::Text("- prescale: %d",ch->prescale); |
| 269 |
FM_OPN_CHIP_DEBUG_BOOL; |
| 270 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); |
| 271 |
break; |
| 272 |
} |
| 273 |
case DIV_SYSTEM_YM2608: |
| 274 |
case DIV_SYSTEM_YM2608_EXT: { |
| 275 |
DivPlatformYM2608* ch=(DivPlatformYM2608*)data; |
| 276 |
ImGui::Text("> YM2608"); |
| 277 |
FM_OPN_CHIP_DEBUG; |
| 278 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 279 |
ImGui::Text("- writeRSSOff: %d",ch->writeRSSOff); |
| 280 |
ImGui::Text("- writeRSSOn: %d",ch->writeRSSOn); |
| 281 |
ImGui::Text("- globalRSSVolume: %d",ch->globalRSSVolume); |
| 282 |
ImGui::Text("- prescale: %d",ch->prescale); |
| 283 |
FM_OPN_CHIP_DEBUG_BOOL; |
| 284 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); |
| 285 |
break; |
| 286 |
} |
| 287 |
case DIV_SYSTEM_YM2610: |
| 288 |
case DIV_SYSTEM_YM2610_EXT: |
| 289 |
case DIV_SYSTEM_YM2610_FULL: |
| 290 |
case DIV_SYSTEM_YM2610_FULL_EXT: { |
| 291 |
DivPlatformYM2610* ch=(DivPlatformYM2610*)data; |
| 292 |
ImGui::Text("> YM2610"); |
| 293 |
OPNB_CHIP_DEBUG; |
| 294 |
break; |
| 295 |
} |
| 296 |
case DIV_SYSTEM_YM2610B: |
| 297 |
case DIV_SYSTEM_YM2610B_EXT: { |
| 298 |
DivPlatformYM2610B* ch=(DivPlatformYM2610B*)data; |
| 299 |
ImGui::Text("> YM2610B"); |
| 300 |
OPNB_CHIP_DEBUG; |
| 301 |
break; |
| 302 |
} |
| 303 |
case DIV_SYSTEM_GB: { |
| 304 |
DivPlatformGB* ch=(DivPlatformGB*)data; |
| 305 |
ImGui::Text("> GameBoy"); |
| 306 |
COMMON_CHIP_DEBUG; |
| 307 |
ImGui::Text("- lastPan: %d",ch->lastPan); |
| 308 |
ImGui::Text("- antiClickPeriodCount: %d",ch->antiClickPeriodCount); |
| 309 |
ImGui::Text("- antiClickWavePos: %d",ch->antiClickWavePos); |
| 310 |
COMMON_CHIP_DEBUG_BOOL; |
| 311 |
ImGui::TextColored(ch->antiClickEnabled?colorOn:colorOff,">> AntiClickEnabled"); |
| 312 |
break; |
| 313 |
} |
| 314 |
case DIV_SYSTEM_PCE: { |
| 315 |
DivPlatformPCE* ch=(DivPlatformPCE*)data; |
| 316 |
ImGui::Text("> PCEngine"); |
| 317 |
COMMON_CHIP_DEBUG; |
| 318 |
ImGui::Text("- lastPan: %d",ch->lastPan); |
| 319 |
ImGui::Text("- curChan: %d",ch->curChan); |
| 320 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 321 |
ImGui::Text("- lfoMode: %d",ch->lfoMode); |
| 322 |
ImGui::Text("- lfoSpeed: %d",ch->lfoSpeed); |
| 323 |
COMMON_CHIP_DEBUG_BOOL; |
| 324 |
ImGui::TextColored(ch->antiClickEnabled?colorOn:colorOff,">> AntiClickEnabled"); |
| 325 |
break; |
| 326 |
} |
| 327 |
case DIV_SYSTEM_NES: { |
| 328 |
DivPlatformNES* ch=(DivPlatformNES*)data; |
| 329 |
ImGui::Text("> NES"); |
| 330 |
COMMON_CHIP_DEBUG; |
| 331 |
ImGui::Text("* DAC:"); |
| 332 |
ImGui::Text(" - Period: %d",ch->dacPeriod); |
| 333 |
ImGui::Text(" - Rate: %d",ch->dacRate); |
| 334 |
ImGui::Text(" - Pos: %d",ch->dacPos); |
| 335 |
ImGui::Text(" - AntiClick: %d",ch->dacAntiClick); |
| 336 |
ImGui::Text(" - Sample: %d",ch->dacSample); |
| 337 |
ImGui::Text("- dpcmBank: %d",ch->dpcmBank); |
| 338 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 339 |
ImGui::Text("- writeOscBuf: %d",ch->writeOscBuf); |
| 340 |
ImGui::Text("- apuType: %d",ch->apuType); |
| 341 |
COMMON_CHIP_DEBUG_BOOL; |
| 342 |
ImGui::TextColored(ch->dpcmMode?colorOn:colorOff,">> DPCMMode"); |
| 343 |
ImGui::TextColored(ch->dacAntiClickOn?colorOn:colorOff,">> DACAntiClickOn"); |
| 344 |
ImGui::TextColored(ch->useNP?colorOn:colorOff,">> UseNP"); |
| 345 |
ImGui::TextColored(ch->goingToLoop?colorOn:colorOff,">> GoingToLoop"); |
| 346 |
break; |
| 347 |
} |
| 348 |
case DIV_SYSTEM_C64_6581: case DIV_SYSTEM_C64_8580: { |
| 349 |
DivPlatformC64* ch=(DivPlatformC64*)data; |
| 350 |
ImGui::Text("> C64"); |
| 351 |
COMMON_CHIP_DEBUG; |
| 352 |
ImGui::Text("- filtControl: %d",ch->filtControl); |
| 353 |
ImGui::Text("- filtRes: %d",ch->filtRes); |
| 354 |
ImGui::Text("- vol: %d",ch->vol); |
| 355 |
ImGui::Text("- writeOscBuf: %d",ch->writeOscBuf); |
| 356 |
ImGui::Text("- filtCut: %d",ch->filtCut); |
| 357 |
ImGui::Text("- resetTime: %d",ch->resetTime); |
| 358 |
COMMON_CHIP_DEBUG_BOOL; |
| 359 |
break; |
| 360 |
} |
| 361 |
case DIV_SYSTEM_ARCADE: |
| 362 |
case DIV_SYSTEM_YM2151: { |
| 363 |
DivPlatformArcade* ch=(DivPlatformArcade*)data; |
| 364 |
ImGui::Text("> YM2151"); |
| 365 |
FM_CHIP_DEBUG; |
| 366 |
ImGui::Text("- baseFreqOff: %d",ch->baseFreqOff); |
| 367 |
ImGui::Text("- amDepth: %d",ch->amDepth); |
| 368 |
ImGui::Text("- pmDepth: %d",ch->pmDepth); |
| 369 |
FM_CHIP_DEBUG_BOOL; |
| 370 |
ImGui::TextColored(ch->useYMFM?colorOn:colorOff,">> UseYMFM"); |
| 371 |
break; |
| 372 |
} |
| 373 |
case DIV_SYSTEM_SEGAPCM: |
| 374 |
case DIV_SYSTEM_SEGAPCM_COMPAT: { |
| 375 |
DivPlatformSegaPCM* ch=(DivPlatformSegaPCM*)data; |
| 376 |
ImGui::Text("> SegaPCM"); |
| 377 |
COMMON_CHIP_DEBUG; |
| 378 |
ImGui::Text("- delay: %d",ch->delay); |
| 379 |
ImGui::Text("- pcmL: %d",ch->pcmL); |
| 380 |
ImGui::Text("- pcmR: %d",ch->pcmR); |
| 381 |
ImGui::Text("- pcmCycles: %d",ch->pcmCycles); |
| 382 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 383 |
COMMON_CHIP_DEBUG_BOOL; |
| 384 |
break; |
| 385 |
} |
| 386 |
case DIV_SYSTEM_AY8910: { |
| 387 |
DivPlatformAY8910* ch=(DivPlatformAY8910*)data; |
| 388 |
ImGui::Text("> AY-3-8910"); |
| 389 |
COMMON_CHIP_DEBUG; |
| 390 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 391 |
ImGui::Text("- stereoSep: %d",ch->stereoSep); |
| 392 |
ImGui::Text("- delay: %d",ch->delay); |
| 393 |
ImGui::Text("- extClock: %d",ch->extClock); |
| 394 |
ImGui::Text("- extDiv: %d",ch->extDiv); |
| 395 |
ImGui::Text("- portAVal: %d",ch->portAVal); |
| 396 |
ImGui::Text("- portBVal: %d",ch->portBVal); |
| 397 |
ImGui::Text("* envelope:"); |
| 398 |
ImGui::Text(" - mode: %d",ch->ayEnvMode); |
| 399 |
ImGui::Text(" - period: %d",ch->ayEnvPeriod); |
| 400 |
ImGui::Text(" * slide: %d",ch->ayEnvSlide); |
| 401 |
ImGui::Text(" - slideLow: %d",ch->ayEnvSlideLow); |
| 402 |
COMMON_CHIP_DEBUG_BOOL; |
| 403 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); |
| 404 |
ImGui::TextColored(ch->stereo?colorOn:colorOff,">> Stereo"); |
| 405 |
ImGui::TextColored(ch->sunsoft?colorOn:colorOff,">> Sunsoft"); |
| 406 |
ImGui::TextColored(ch->intellivision?colorOn:colorOff,">> Intellivision"); |
| 407 |
ImGui::TextColored(ch->clockSel?colorOn:colorOff,">> ClockSel"); |
| 408 |
ImGui::TextColored(ch->ioPortA?colorOn:colorOff,">> IoPortA"); |
| 409 |
ImGui::TextColored(ch->ioPortB?colorOn:colorOff,">> IoPortB"); |
| 410 |
break; |
| 411 |
} |
| 412 |
case DIV_SYSTEM_AY8930: { |
| 413 |
DivPlatformAY8930* ch=(DivPlatformAY8930*)data; |
| 414 |
ImGui::Text("> AY8930"); |
| 415 |
COMMON_CHIP_DEBUG; |
| 416 |
ImGui::Text("* noise:"); |
| 417 |
ImGui::Text(" - and: %d",ch->ayNoiseAnd); |
| 418 |
ImGui::Text(" - or: %d",ch->ayNoiseOr); |
| 419 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 420 |
ImGui::Text("- stereoSep: %d",ch->stereoSep); |
| 421 |
ImGui::Text("- delay: %d",ch->delay); |
| 422 |
ImGui::Text("- portAVal: %d",ch->portAVal); |
| 423 |
ImGui::Text("- portBVal: %d",ch->portBVal); |
| 424 |
COMMON_CHIP_DEBUG_BOOL; |
| 425 |
ImGui::TextColored(ch->bank?colorOn:colorOff,">> Bank"); |
| 426 |
ImGui::TextColored(ch->extMode?colorOn:colorOff,">> ExtMode"); |
| 427 |
ImGui::TextColored(ch->stereo?colorOn:colorOff,">> Stereo"); |
| 428 |
ImGui::TextColored(ch->clockSel?colorOn:colorOff,">> ClockSel"); |
| 429 |
ImGui::TextColored(ch->ioPortA?colorOn:colorOff,">> IoPortA"); |
| 430 |
ImGui::TextColored(ch->ioPortB?colorOn:colorOff,">> IoPortB"); |
| 431 |
break; |
| 432 |
} |
| 433 |
case DIV_SYSTEM_QSOUND: { |
| 434 |
DivPlatformQSound* ch=(DivPlatformQSound*)data; |
| 435 |
ImGui::Text("> QSound"); |
| 436 |
COMMON_CHIP_DEBUG; |
| 437 |
ImGui::Text("* echo:"); |
| 438 |
ImGui::Text(" - delay: %d",ch->echoDelay); |
| 439 |
ImGui::Text(" - feedback: %d",ch->echoFeedback); |
| 440 |
COMMON_CHIP_DEBUG_BOOL; |
| 441 |
break; |
| 442 |
} |
| 443 |
case DIV_SYSTEM_X1_010: { |
| 444 |
DivPlatformX1_010* ch=(DivPlatformX1_010*)data; |
| 445 |
ImGui::Text("> X1-010"); |
| 446 |
COMMON_CHIP_DEBUG; |
| 447 |
ImGui::Text("- sampleBank: %d",ch->sampleBank); |
| 448 |
ImGui::Text("- bankSlot: [%d,%d,%d,%d,%d,%d,%d,%d]",ch->bankSlot[0],ch->bankSlot[1],ch->bankSlot[2],ch->bankSlot[3],ch->bankSlot[4],ch->bankSlot[5],ch->bankSlot[6],ch->bankSlot[7]); |
| 449 |
COMMON_CHIP_DEBUG_BOOL; |
| 450 |
ImGui::TextColored(ch->stereo?colorOn:colorOff,">> Stereo"); |
| 451 |
ImGui::TextColored(ch->isBanked?colorOn:colorOff,">> IsBanked"); |
| 452 |
break; |
| 453 |
} |
| 454 |
case DIV_SYSTEM_N163: { |
| 455 |
DivPlatformN163* ch=(DivPlatformN163*)data; |
| 456 |
ImGui::Text("> N163"); |
| 457 |
COMMON_CHIP_DEBUG; |
| 458 |
ImGui::Text("- initChanMax: %d",ch->initChanMax); |
| 459 |
ImGui::Text("- chanMax: %d",ch->chanMax); |
| 460 |
ImGui::Text("- loadWave: %d",ch->loadWave); |
| 461 |
ImGui::Text("- loadPos: %d",ch->loadPos); |
| 462 |
COMMON_CHIP_DEBUG_BOOL; |
| 463 |
ImGui::TextColored(ch->multiplex?colorOn:colorOff,">> Multiplex"); |
| 464 |
break; |
| 465 |
} |
| 466 |
case DIV_SYSTEM_VRC6: { |
| 467 |
DivPlatformVRC6* ch=(DivPlatformVRC6*)data; |
| 468 |
ImGui::Text("> VRC6"); |
| 469 |
COMMON_CHIP_DEBUG; |
| 470 |
ImGui::Text("- sampleBank: %.2x",ch->sampleBank); |
| 471 |
COMMON_CHIP_DEBUG_BOOL; |
| 472 |
break; |
| 473 |
} |
| 474 |
case DIV_SYSTEM_LYNX: { |
| 475 |
DivPlatformLynx* ch=(DivPlatformLynx*)data; |
| 476 |
ImGui::Text("> Lynx"); |
| 477 |
COMMON_CHIP_DEBUG; |
| 478 |
COMMON_CHIP_DEBUG_BOOL; |
| 479 |
break; |
| 480 |
} |
| 481 |
case DIV_SYSTEM_PCM_DAC: { |
| 482 |
DivPlatformPCMDAC* ch=(DivPlatformPCMDAC*)data; |
| 483 |
ImGui::Text("> PCM DAC"); |
| 484 |
COMMON_CHIP_DEBUG; |
| 485 |
ImGui::Text("- outDepth: %d",ch->outDepth); |
| 486 |
COMMON_CHIP_DEBUG_BOOL; |
| 487 |
ImGui::TextColored(ch->outStereo?colorOn:colorOff,">> OutStereo"); |
| 488 |
break; |
| 489 |
} |
| 490 |
case DIV_SYSTEM_ES5506: { |
| 491 |
DivPlatformES5506* ch=(DivPlatformES5506*)data; |
| 492 |
ImGui::Text("> ES5506"); |
| 493 |
COMMON_CHIP_DEBUG; |
| 494 |
ImGui::Text("- cycle: %d",ch->cycle); |
| 495 |
ImGui::Text("- curPage: %d",ch->curPage); |
| 496 |
ImGui::Text("- volScale: %d",ch->volScale); |
| 497 |
ImGui::Text("- irqv: %.2x",ch->irqv); |
| 498 |
ImGui::Text("- curCR: %.8x",ch->curCR); |
| 499 |
ImGui::Text("- initChanMax: %d",ch->initChanMax); |
| 500 |
ImGui::Text("- chanMax: %d",ch->chanMax); |
| 501 |
COMMON_CHIP_DEBUG_BOOL; |
| 502 |
ImGui::TextColored(ch->isReaded?colorOn:colorOff,">> isReaded"); |
| 503 |
ImGui::TextColored(ch->irqTrigger?colorOn:colorOff,">> IrqTrigger"); |
| 504 |
break; |
| 505 |
} |
| 506 |
case DIV_SYSTEM_K007232: { |
| 507 |
DivPlatformK007232* ch=(DivPlatformK007232*)data; |
| 508 |
ImGui::Text("> K007232"); |
| 509 |
COMMON_CHIP_DEBUG; |
| 510 |
ImGui::Text("- delay: %.2x",ch->delay); |
| 511 |
ImGui::Text("- lastLoop: %.2x",ch->lastLoop); |
| 512 |
ImGui::Text("- lastVolume: %.2x",ch->lastVolume); |
| 513 |
COMMON_CHIP_DEBUG_BOOL; |
| 514 |
ImGui::TextColored(ch->stereo?colorOn:colorOff,">> Stereo"); |
| 515 |
break; |
| 516 |
} |
| 517 |
case DIV_SYSTEM_GA20: { |
| 518 |
DivPlatformGA20* ch=(DivPlatformGA20*)data; |
| 519 |
ImGui::Text("> GA20"); |
| 520 |
COMMON_CHIP_DEBUG; |
| 521 |
COMMON_CHIP_DEBUG_BOOL; |
| 522 |
break; |
| 523 |
} |
| 524 |
case DIV_SYSTEM_SM8521: { |
| 525 |
DivPlatformSM8521* ch=(DivPlatformSM8521*)data; |
| 526 |
ImGui::Text("> SM8521"); |
| 527 |
COMMON_CHIP_DEBUG; |
| 528 |
COMMON_CHIP_DEBUG_BOOL; |
| 529 |
ImGui::TextColored(ch->antiClickEnabled?colorOn:colorOff,">> AntiClickEnabled"); |
| 530 |
break; |
| 531 |
} |
| 532 |
case DIV_SYSTEM_PV1000: { |
| 533 |
DivPlatformPV1000* ch=(DivPlatformPV1000*)data; |
| 534 |
ImGui::Text("> PV1000"); |
| 535 |
COMMON_CHIP_DEBUG; |
| 536 |
COMMON_CHIP_DEBUG_BOOL; |
| 537 |
break; |
| 538 |
} |
| 539 |
case DIV_SYSTEM_K053260: { |
| 540 |
DivPlatformK053260* ch=(DivPlatformK053260*)data; |
| 541 |
ImGui::Text("> K053260"); |
| 542 |
COMMON_CHIP_DEBUG; |
| 543 |
COMMON_CHIP_DEBUG_BOOL; |
| 544 |
break; |
| 545 |
} |
| 546 |
case DIV_SYSTEM_C140: { |
| 547 |
DivPlatformC140* ch=(DivPlatformC140*)data; |
| 548 |
ImGui::Text("> C140"); |
| 549 |
COMMON_CHIP_DEBUG; |
| 550 |
COMMON_CHIP_DEBUG_BOOL; |
| 551 |
break; |
| 552 |
} |
| 553 |
default: { |
| 554 |
DivDispatch* ch=(DivDispatch*)data; |
| 555 |
COMMON_CHIP_DEBUG; |
| 556 |
ImGui::Text("Unimplemented chip! Help!"); |
| 557 |
break; |
| 558 |
} |
| 559 |
} |
| 560 |
} |
| 561 |
void putDispatchChan(void* data, int chanNum, int type) { |
| 562 |
ImVec4 colorOn=ImVec4(1.0f,1.0f,0.0f,1.0f); |
| 563 |
ImVec4 colorOff=ImVec4(0.3f,0.3f,0.3f,1.0f); |
| 564 |
switch (type) { |
| 565 |
case DIV_SYSTEM_GENESIS: { |
| 566 |
if (chanNum>5) { |
| 567 |
SMS_CHAN_DEBUG; |
| 568 |
} else { |
| 569 |
GENESIS_CHAN_DEBUG; |
| 570 |
} |
| 571 |
break; |
| 572 |
} |
| 573 |
case DIV_SYSTEM_GENESIS_EXT: { |
| 574 |
if (chanNum>8) { |
| 575 |
SMS_CHAN_DEBUG; |
| 576 |
} else if (chanNum>=2 && chanNum<=5) { |
| 577 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; |
| 578 |
ImGui::Text("> YM2612 (per operator)"); |
| 579 |
OPNB_OPCHAN_DEBUG; |
| 580 |
} else { |
| 581 |
GENESIS_CHAN_DEBUG; |
| 582 |
} |
| 583 |
break; |
| 584 |
} |
| 585 |
case DIV_SYSTEM_YM2612: |
| 586 |
case DIV_SYSTEM_YM2612_DUALPCM: { |
| 587 |
GENESIS_CHAN_DEBUG; |
| 588 |
break; |
| 589 |
} |
| 590 |
case DIV_SYSTEM_YM2612_EXT: |
| 591 |
case DIV_SYSTEM_YM2612_DUALPCM_EXT: { |
| 592 |
if (chanNum>=2 && chanNum<=5) { |
| 593 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; |
| 594 |
ImGui::Text("> YM2612 (per operator)"); |
| 595 |
OPNB_OPCHAN_DEBUG; |
| 596 |
} else { |
| 597 |
GENESIS_CHAN_DEBUG; |
| 598 |
} |
| 599 |
break; |
| 600 |
} |
| 601 |
case DIV_SYSTEM_SMS: { |
| 602 |
SMS_CHAN_DEBUG; |
| 603 |
break; |
| 604 |
} |
| 605 |
case DIV_SYSTEM_YM2203: { |
| 606 |
OPN_CHAN_DEBUG; |
| 607 |
break; |
| 608 |
} |
| 609 |
case DIV_SYSTEM_YM2203_EXT: { |
| 610 |
if (chanNum>=2 && chanNum<=5) { |
| 611 |
OPN_OPCHAN_DEBUG; |
| 612 |
} else { |
| 613 |
OPN_CHAN_DEBUG; |
| 614 |
} |
| 615 |
break; |
| 616 |
} |
| 617 |
case DIV_SYSTEM_YM2608: { |
| 618 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 619 |
ImGui::Text("> YM2608"); |
| 620 |
OPNB_CHAN_DEBUG; |
| 621 |
break; |
| 622 |
} |
| 623 |
case DIV_SYSTEM_YM2608_EXT: { |
| 624 |
if (chanNum>=2 && chanNum<=5) { |
| 625 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; |
| 626 |
ImGui::Text("> YM2608 (per operator)"); |
| 627 |
OPNB_OPCHAN_DEBUG; |
| 628 |
} else { |
| 629 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 630 |
ImGui::Text("> YM2608"); |
| 631 |
OPNB_CHAN_DEBUG; |
| 632 |
} |
| 633 |
break; |
| 634 |
} |
| 635 |
case DIV_SYSTEM_YM2610: |
| 636 |
case DIV_SYSTEM_YM2610_FULL: { |
| 637 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 638 |
ImGui::Text("> YM2610"); |
| 639 |
OPNB_CHAN_DEBUG; |
| 640 |
break; |
| 641 |
} |
| 642 |
case DIV_SYSTEM_YM2610B: { |
| 643 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 644 |
ImGui::Text("> YM2610B"); |
| 645 |
OPNB_CHAN_DEBUG; |
| 646 |
break; |
| 647 |
} |
| 648 |
case DIV_SYSTEM_YM2610_EXT: |
| 649 |
case DIV_SYSTEM_YM2610_FULL_EXT: { |
| 650 |
if (chanNum>=1 && chanNum<=4) { |
| 651 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; |
| 652 |
ImGui::Text("> YM2610 (per operator)"); |
| 653 |
OPNB_OPCHAN_DEBUG; |
| 654 |
} else { |
| 655 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 656 |
ImGui::Text("> YM2610"); |
| 657 |
OPNB_CHAN_DEBUG; |
| 658 |
} |
| 659 |
break; |
| 660 |
} |
| 661 |
case DIV_SYSTEM_YM2610B_EXT: { |
| 662 |
if (chanNum>=2 && chanNum<=5) { |
| 663 |
DivPlatformOPN::OPNOpChannelStereo* ch=(DivPlatformOPN::OPNOpChannelStereo*)data; |
| 664 |
ImGui::Text("> YM2610B (per operator)"); |
| 665 |
OPNB_OPCHAN_DEBUG; |
| 666 |
} else { |
| 667 |
DivPlatformOPN::OPNChannelStereo* ch=(DivPlatformOPN::OPNChannelStereo*)data; |
| 668 |
ImGui::Text("> YM2610B"); |
| 669 |
OPNB_CHAN_DEBUG; |
| 670 |
} |
| 671 |
break; |
| 672 |
} |
| 673 |
case DIV_SYSTEM_GB: { |
| 674 |
DivPlatformGB::Channel* ch=(DivPlatformGB::Channel*)data; |
| 675 |
ImGui::Text("> GameBoy"); |
| 676 |
COMMON_CHAN_DEBUG; |
| 677 |
ImGui::Text("- duty: %d",ch->duty); |
| 678 |
ImGui::Text("- sweep: %.2x",ch->sweep); |
| 679 |
ImGui::Text("- wave: %d",ch->wave); |
| 680 |
COMMON_CHAN_DEBUG_BOOL; |
| 681 |
ImGui::TextColored(ch->sweepChanged?colorOn:colorOff,">> SweepChanged"); |
| 682 |
break; |
| 683 |
} |
| 684 |
case DIV_SYSTEM_PCE: { |
| 685 |
DivPlatformPCE::Channel* ch=(DivPlatformPCE::Channel*)data; |
| 686 |
ImGui::Text("> PCEngine"); |
| 687 |
COMMON_CHAN_DEBUG; |
| 688 |
ImGui::Text("* DAC:"); |
| 689 |
ImGui::Text(" - period: %d",ch->dacPeriod); |
| 690 |
ImGui::Text(" - rate: %d",ch->dacRate); |
| 691 |
ImGui::Text(" - pos: %d",ch->dacPos); |
| 692 |
ImGui::Text(" - out: %d",ch->dacOut); |
| 693 |
ImGui::Text(" - sample: %d",ch->dacSample); |
| 694 |
ImGui::Text("- pan: %.2x",ch->pan); |
| 695 |
ImGui::Text("- wave: %d",ch->wave); |
| 696 |
ImGui::Text("- macroVolMul: %d",ch->macroVolMul); |
| 697 |
COMMON_CHAN_DEBUG_BOOL; |
| 698 |
ImGui::TextColored(ch->noise?colorOn:colorOff,">> Noise"); |
| 699 |
ImGui::TextColored(ch->pcm?colorOn:colorOff,">> DAC"); |
| 700 |
ImGui::TextColored(ch->furnaceDac?colorOn:colorOff,">> FurnaceDAC"); |
| 701 |
break; |
| 702 |
} |
| 703 |
case DIV_SYSTEM_NES: { |
| 704 |
DivPlatformNES::Channel* ch=(DivPlatformNES::Channel*)data; |
| 705 |
ImGui::Text("> NES"); |
| 706 |
COMMON_CHAN_DEBUG; |
| 707 |
ImGui::Text(" - prev: %d",ch->prevFreq); |
| 708 |
ImGui::Text("- duty: %d",ch->duty); |
| 709 |
ImGui::Text("- sweep: %.2x",ch->sweep); |
| 710 |
COMMON_CHAN_DEBUG_BOOL; |
| 711 |
ImGui::TextColored(ch->sweepChanged?colorOn:colorOff,">> SweepChanged"); |
| 712 |
ImGui::TextColored(ch->furnaceDac?colorOn:colorOff,">> FurnaceDAC"); |
| 713 |
break; |
| 714 |
} |
| 715 |
case DIV_SYSTEM_C64_6581: case DIV_SYSTEM_C64_8580: { |
| 716 |
DivPlatformC64::Channel* ch=(DivPlatformC64::Channel*)data; |
| 717 |
ImGui::Text("> C64"); |
| 718 |
COMMON_CHAN_DEBUG; |
| 719 |
ImGui::Text("- prevFreq: %d",ch->prevFreq); |
| 720 |
ImGui::Text("- testWhen: %d",ch->testWhen); |
| 721 |
ImGui::Text("- duty: %d",ch->duty); |
| 722 |
ImGui::Text("- sweep: %.2x",ch->sweep); |
| 723 |
ImGui::Text("- wave: %.1x",ch->wave); |
| 724 |
ImGui::Text("- ADSR: %.1x %.1x %.1x %.1x",ch->attack,ch->decay,ch->sustain,ch->release); |
| 725 |
COMMON_CHAN_DEBUG_BOOL; |
| 726 |
ImGui::TextColored(ch->sweepChanged?colorOn:colorOff,">> SweepChanged"); |
| 727 |
ImGui::TextColored(ch->filter?colorOn:colorOff,">> Filter"); |
| 728 |
ImGui::TextColored(ch->resetMask?colorOn:colorOff,">> ResetMask"); |
| 729 |
ImGui::TextColored(ch->resetFilter?colorOn:colorOff,">> ResetFilter"); |
| 730 |
ImGui::TextColored(ch->resetDuty?colorOn:colorOff,">> ResetDuty"); |
| 731 |
ImGui::TextColored(ch->ring?colorOn:colorOff,">> Ring"); |
| 732 |
ImGui::TextColored(ch->sync?colorOn:colorOff,">> Sync"); |
| 733 |
break; |
| 734 |
} |
| 735 |
case DIV_SYSTEM_ARCADE: |
| 736 |
case DIV_SYSTEM_YM2151: { |
| 737 |
DivPlatformArcade::Channel* ch=(DivPlatformArcade::Channel*)data; |
| 738 |
ImGui::Text("> YM2151"); |
| 739 |
ImGui::Text("- freqHL: %.2x%.2x",ch->freqH,ch->freqL); |
| 740 |
COMMON_CHAN_DEBUG; |
| 741 |
ImGui::Text("- KOnCycles: %d",ch->konCycles); |
| 742 |
ImGui::Text("- chVolL: %.2x",ch->chVolL); |
| 743 |
ImGui::Text("- chVolR: %.2x",ch->chVolR); |
| 744 |
COMMON_CHAN_DEBUG_BOOL; |
| 745 |
break; |
| 746 |
} |
| 747 |
case DIV_SYSTEM_SEGAPCM: |
| 748 |
case DIV_SYSTEM_SEGAPCM_COMPAT: { |
| 749 |
DivPlatformSegaPCM::Channel* ch=(DivPlatformSegaPCM::Channel*)data; |
| 750 |
ImGui::Text("> SegaPCM"); |
| 751 |
COMMON_CHAN_DEBUG; |
| 752 |
ImGui::Text("* PCM:"); |
| 753 |
ImGui::Text(" - sample: %d",ch->pcm.sample); |
| 754 |
ImGui::Text(" - pos: %d",ch->pcm.pos); |
| 755 |
ImGui::Text(" - len: %d",ch->pcm.len); |
| 756 |
ImGui::Text(" - freq: %d",ch->pcm.freq); |
| 757 |
ImGui::Text("- chVolL: %.2x",ch->chVolL); |
| 758 |
ImGui::Text("- chVolR: %.2x",ch->chVolR); |
| 759 |
ImGui::Text("- chPanL: %.2x",ch->chPanL); |
| 760 |
ImGui::Text("- chPanR: %.2x",ch->chPanR); |
| 761 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 762 |
COMMON_CHAN_DEBUG_BOOL; |
| 763 |
ImGui::TextColored(ch->furnacePCM?colorOn:colorOff,">> FurnacePCM"); |
| 764 |
ImGui::TextColored(ch->isNewSegaPCM?colorOn:colorOff,">> IsNewSegaPCM"); |
| 765 |
break; |
| 766 |
} |
| 767 |
case DIV_SYSTEM_AY8910: { |
| 768 |
DivPlatformAY8910::Channel* ch=(DivPlatformAY8910::Channel*)data; |
| 769 |
ImGui::Text("> AY-3-8910"); |
| 770 |
COMMON_CHAN_DEBUG; |
| 771 |
ImGui::Text("* DAC:"); |
| 772 |
ImGui::Text(" - sample: %d",ch->dac.sample); |
| 773 |
ImGui::Text(" - rate: %d",ch->dac.rate); |
| 774 |
ImGui::Text(" - period: %d",ch->dac.period); |
| 775 |
ImGui::Text(" - pos: %d",ch->dac.pos); |
| 776 |
ImGui::Text(" - out: %d",ch->dac.out); |
| 777 |
ImGui::Text("- autoEnvNum: %.2x",ch->autoEnvNum); |
| 778 |
ImGui::Text("- autoEnvDen: %.2x",ch->autoEnvDen); |
| 779 |
COMMON_CHAN_DEBUG_BOOL; |
| 780 |
ImGui::TextColored(ch->dac.furnaceDAC?colorOn:colorOff,">> furnaceDAC"); |
| 781 |
break; |
| 782 |
} |
| 783 |
case DIV_SYSTEM_AY8930: { |
| 784 |
DivPlatformAY8930::Channel* ch=(DivPlatformAY8930::Channel*)data; |
| 785 |
ImGui::Text("> AY8930"); |
| 786 |
COMMON_CHAN_DEBUG; |
| 787 |
ImGui::Text("- duty: %d",ch->duty); |
| 788 |
ImGui::Text("* DAC:"); |
| 789 |
ImGui::Text(" - sample: %d",ch->dac.sample); |
| 790 |
ImGui::Text(" - rate: %d",ch->dac.rate); |
| 791 |
ImGui::Text(" - period: %d",ch->dac.period); |
| 792 |
ImGui::Text(" - pos: %d",ch->dac.pos); |
| 793 |
ImGui::Text(" - out: %d",ch->dac.out); |
| 794 |
ImGui::Text("- autoEnvNum: %.2x",ch->autoEnvNum); |
| 795 |
ImGui::Text("- autoEnvDen: %.2x",ch->autoEnvDen); |
| 796 |
COMMON_CHAN_DEBUG_BOOL; |
| 797 |
ImGui::TextColored(ch->dac.furnaceDAC?colorOn:colorOff,">> furnaceDAC"); |
| 798 |
break; |
| 799 |
} |
| 800 |
case DIV_SYSTEM_QSOUND: { |
| 801 |
DivPlatformQSound::Channel* ch=(DivPlatformQSound::Channel*)data; |
| 802 |
ImGui::Text("> QSound"); |
| 803 |
COMMON_CHAN_DEBUG; |
| 804 |
ImGui::Text("- sample: %d",ch->sample); |
| 805 |
ImGui::Text("- echo: %d",ch->echo); |
| 806 |
ImGui::Text("- panning: %d",ch->panning); |
| 807 |
ImGui::Text("- resVol: %.2x",ch->resVol); |
| 808 |
COMMON_CHAN_DEBUG_BOOL; |
| 809 |
ImGui::TextColored(ch->useWave?colorOn:colorOff,">> UseWave"); |
| 810 |
ImGui::TextColored(ch->surround?colorOn:colorOff,">> Surround"); |
| 811 |
ImGui::TextColored(ch->isNewQSound?colorOn:colorOff,">> IsNewQSound"); |
| 812 |
break; |
| 813 |
} |
| 814 |
case DIV_SYSTEM_X1_010: { |
| 815 |
DivPlatformX1_010::Channel* ch=(DivPlatformX1_010::Channel*)data; |
| 816 |
ImGui::Text("> X1-010"); |
| 817 |
COMMON_CHAN_DEBUG; |
| 818 |
ImGui::Text("- wave: %d",ch->wave); |
| 819 |
ImGui::Text("- sample: %d",ch->sample); |
| 820 |
ImGui::Text("- pan: %d",ch->pan); |
| 821 |
ImGui::Text("* envelope:"); |
| 822 |
ImGui::Text(" - shape: %d",ch->env.shape); |
| 823 |
ImGui::Text(" - period: %.2x",ch->env.period); |
| 824 |
ImGui::Text(" - slide: %.2x",ch->env.slide); |
| 825 |
ImGui::Text(" - slidefrac: %.2x",ch->env.slidefrac); |
| 826 |
ImGui::Text(" - autoEnvNum: %.2x",ch->autoEnvNum); |
| 827 |
ImGui::Text(" - autoEnvDen: %.2x",ch->autoEnvDen); |
| 828 |
ImGui::Text("- WaveBank: %d",ch->waveBank); |
| 829 |
ImGui::Text("- bankSlot: %d",ch->bankSlot); |
| 830 |
ImGui::Text("- Lvol: %.2x",ch->lvol); |
| 831 |
ImGui::Text("- Rvol: %.2x",ch->rvol); |
| 832 |
COMMON_CHAN_DEBUG_BOOL; |
| 833 |
ImGui::TextColored(ch->envChanged?colorOn:colorOff,">> EnvChanged"); |
| 834 |
ImGui::TextColored(ch->furnacePCM?colorOn:colorOff,">> FurnacePCM"); |
| 835 |
ImGui::TextColored(ch->pcm?colorOn:colorOff,">> PCM"); |
| 836 |
ImGui::TextColored(ch->env.flag.envEnable?colorOn:colorOff,">> EnvEnable"); |
| 837 |
ImGui::TextColored(ch->env.flag.envOneshot?colorOn:colorOff,">> EnvOneshot"); |
| 838 |
ImGui::TextColored(ch->env.flag.envSplit?colorOn:colorOff,">> EnvSplit"); |
| 839 |
ImGui::TextColored(ch->env.flag.envHinvR?colorOn:colorOff,">> EnvHinvR"); |
| 840 |
ImGui::TextColored(ch->env.flag.envVinvR?colorOn:colorOff,">> EnvVinvR"); |
| 841 |
ImGui::TextColored(ch->env.flag.envHinvL?colorOn:colorOff,">> EnvHinvL"); |
| 842 |
ImGui::TextColored(ch->env.flag.envVinvL?colorOn:colorOff,">> EnvVinvL"); |
| 843 |
break; |
| 844 |
} |
| 845 |
case DIV_SYSTEM_N163: { |
| 846 |
DivPlatformN163::Channel* ch=(DivPlatformN163::Channel*)data; |
| 847 |
ImGui::Text("> N163"); |
| 848 |
COMMON_CHAN_DEBUG; |
| 849 |
ImGui::Text("- wave: %d",ch->wave); |
| 850 |
ImGui::Text("- wavepos: %d",ch->wavePos); |
| 851 |
ImGui::Text("- wavelen: %d",ch->waveLen); |
| 852 |
ImGui::Text("- wavemode: %d",ch->waveMode); |
| 853 |
ImGui::Text("- resVol: %.2x",ch->resVol); |
| 854 |
COMMON_CHAN_DEBUG_BOOL; |
| 855 |
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged"); |
| 856 |
ImGui::TextColored(ch->waveChanged?colorOn:colorOff,">> WaveChanged"); |
| 857 |
ImGui::TextColored(ch->waveUpdated?colorOn:colorOff,">> WaveUpdated"); |
| 858 |
break; |
| 859 |
} |
| 860 |
case DIV_SYSTEM_VRC6: { |
| 861 |
DivPlatformVRC6::Channel* ch=(DivPlatformVRC6::Channel*)data; |
| 862 |
ImGui::Text("> VRC6"); |
| 863 |
COMMON_CHAN_DEBUG; |
| 864 |
ImGui::Text("* DAC:"); |
| 865 |
ImGui::Text(" - period: %d",ch->dacPeriod); |
| 866 |
ImGui::Text(" - rate: %d",ch->dacRate); |
| 867 |
ImGui::Text(" - out: %d",ch->dacOut); |
| 868 |
ImGui::Text(" - pos: %d",ch->dacPos); |
| 869 |
ImGui::Text(" - sample: %d",ch->dacSample); |
| 870 |
ImGui::Text("- duty: %d",ch->duty); |
| 871 |
COMMON_CHAN_DEBUG_BOOL; |
| 872 |
ImGui::TextColored(ch->pcm?colorOn:colorOff,">> DAC"); |
| 873 |
ImGui::TextColored(ch->furnaceDac?colorOn:colorOff,">> FurnaceDAC"); |
| 874 |
break; |
| 875 |
} |
| 876 |
case DIV_SYSTEM_ES5506: { |
| 877 |
DivPlatformES5506::Channel* ch=(DivPlatformES5506::Channel*)data; |
| 878 |
ImGui::Text("> ES5506"); |
| 879 |
COMMON_CHAN_DEBUG; |
| 880 |
ImGui::Text("- nextFreq: %d",ch->nextFreq); |
| 881 |
ImGui::Text("- nextNote: %d",ch->nextNote); |
| 882 |
ImGui::Text("- currNote: %d",ch->currNote); |
| 883 |
ImGui::Text("- wave: %d",ch->wave); |
| 884 |
ImGui::Text("- VolMacroMax: %d",ch->volMacroMax); |
| 885 |
ImGui::Text("- PanMacroMax: %d",ch->panMacroMax); |
| 886 |
ImGui::Text("- CR: %.4x",ch->cr); |
| 887 |
ImGui::Text("- CRWriteVal: %.4x",ch->crWriteVal); |
| 888 |
ImGui::Text("- CRDirVal: %.4x",ch->crDirVal); |
| 889 |
ImGui::Text("* PCM:"); |
| 890 |
ImGui::Text(" * index: %d",ch->pcm.index); |
| 891 |
ImGui::Text(" - next: %d",ch->pcm.next); |
| 892 |
ImGui::Text(" - note: %d",ch->pcm.note); |
| 893 |
ImGui::Text(" * freqOffs: %.6f",ch->pcm.freqOffs); |
| 894 |
ImGui::Text(" - next: %.6f",ch->pcm.nextFreqOffs); |
| 895 |
ImGui::Text(" - bank: %.2x",ch->pcm.bank); |
| 896 |
ImGui::Text(" - start: %.8x",ch->pcm.start); |
| 897 |
ImGui::Text(" - end: %.8x",ch->pcm.end); |
| 898 |
ImGui::Text(" - length: %.8x",ch->pcm.length); |
| 899 |
ImGui::Text(" - loopStart: %.8x",ch->pcm.loopStart); |
| 900 |
ImGui::Text(" - loopEnd: %.8x",ch->pcm.loopEnd); |
| 901 |
ImGui::Text(" - loopMode: %d",ch->pcm.loopMode); |
| 902 |
ImGui::Text(" - nextPos: %d",ch->pcm.nextPos); |
| 903 |
ImGui::Text("* Filter:"); |
| 904 |
ImGui::Text(" - Mode: %d",ch->filter.mode); |
| 905 |
ImGui::Text(" - K1: %.4x",ch->filter.k1); |
| 906 |
ImGui::Text(" - K2: %.4x",ch->filter.k2); |
| 907 |
ImGui::Text("* Envelope:"); |
| 908 |
ImGui::Text(" - EnvCount: %.3x",ch->envelope.ecount); |
| 909 |
ImGui::Text(" - LVRamp: %d",ch->envelope.lVRamp); |
| 910 |
ImGui::Text(" - RVRamp: %d",ch->envelope.rVRamp); |
| 911 |
ImGui::Text(" - K1Ramp: %d",ch->envelope.k1Ramp); |
| 912 |
ImGui::Text(" - K2Ramp: %d",ch->envelope.k2Ramp); |
| 913 |
ImGui::Text(" - K1Offs: %d",ch->k1Offs); |
| 914 |
ImGui::Text(" - K2Offs: %d",ch->k2Offs); |
| 915 |
ImGui::Text(" - K1Slide: %d",ch->k1Slide); |
| 916 |
ImGui::Text(" - K2Slide: %d",ch->k2Slide); |
| 917 |
ImGui::Text(" - K1Prev: %.4x",ch->k1Prev); |
| 918 |
ImGui::Text(" - K2Prev: %.4x",ch->k2Prev); |
| 919 |
ImGui::Text("* Overwrite:"); |
| 920 |
ImGui::Text(" * Filter:"); |
| 921 |
ImGui::Text(" - Mode: %d",ch->overwrite.filter.mode); |
| 922 |
ImGui::Text(" - K1: %.4x",ch->overwrite.filter.k1); |
| 923 |
ImGui::Text(" - K2: %.4x",ch->overwrite.filter.k2); |
| 924 |
ImGui::Text(" * Envelope:"); |
| 925 |
ImGui::Text(" - EnvCount: %.3x",ch->overwrite.envelope.ecount); |
| 926 |
ImGui::Text(" - LVRamp: %d",ch->overwrite.envelope.lVRamp); |
| 927 |
ImGui::Text(" - RVRamp: %d",ch->overwrite.envelope.rVRamp); |
| 928 |
ImGui::Text(" - K1Ramp: %d",ch->overwrite.envelope.k1Ramp); |
| 929 |
ImGui::Text(" - K2Ramp: %d",ch->overwrite.envelope.k2Ramp); |
| 930 |
ImGui::Text("- CA: %.2x",ch->ca); |
| 931 |
ImGui::Text("- LVol: %.2x",ch->lVol); |
| 932 |
ImGui::Text("- RVol: %.2x",ch->rVol); |
| 933 |
ImGui::Text("- outLVol: %.2x",ch->outLVol); |
| 934 |
ImGui::Text("- outRVol: %.2x",ch->outRVol); |
| 935 |
ImGui::Text("- ResLVol: %.2x",ch->resLVol); |
| 936 |
ImGui::Text("- ResRVol: %.2x",ch->resRVol); |
| 937 |
ImGui::Text("- oscOut: %d",ch->oscOut); |
| 938 |
COMMON_CHAN_DEBUG_BOOL; |
| 939 |
ImGui::TextColored(ch->volChanged.lVol?colorOn:colorOff,">> LVolChanged"); |
| 940 |
ImGui::TextColored(ch->volChanged.rVol?colorOn:colorOff,">> RVolChanged"); |
| 941 |
ImGui::TextColored(ch->filterChanged.mode?colorOn:colorOff,">> FilterModeChanged"); |
| 942 |
ImGui::TextColored(ch->filterChanged.k1?colorOn:colorOff,">> FilterK1Changed"); |
| 943 |
ImGui::TextColored(ch->filterChanged.k2?colorOn:colorOff,">> FilterK2Changed"); |
| 944 |
ImGui::TextColored(ch->envChanged.ecount?colorOn:colorOff,">> EnvECountChanged"); |
| 945 |
ImGui::TextColored(ch->envChanged.lVRamp?colorOn:colorOff,">> EnvLVRampChanged"); |
| 946 |
ImGui::TextColored(ch->envChanged.rVRamp?colorOn:colorOff,">> EnvRVRampChanged"); |
| 947 |
ImGui::TextColored(ch->envChanged.k1Ramp?colorOn:colorOff,">> EnvK1RampChanged"); |
| 948 |
ImGui::TextColored(ch->envChanged.k2Ramp?colorOn:colorOff,">> EnvK2RampChanged"); |
| 949 |
ImGui::TextColored(ch->pcmChanged.index?colorOn:colorOff,">> PCMIndexChanged"); |
| 950 |
ImGui::TextColored(ch->pcmChanged.slice?colorOn:colorOff,">> PCMSliceChanged"); |
| 951 |
ImGui::TextColored(ch->pcmChanged.position?colorOn:colorOff,">> PCMPositionChanged"); |
| 952 |
ImGui::TextColored(ch->pcmChanged.loopBank?colorOn:colorOff,">> PCMLoopBankChanged"); |
| 953 |
ImGui::TextColored(ch->isReverseLoop?colorOn:colorOff,">> IsReverseLoop"); |
| 954 |
ImGui::TextColored(ch->crChanged?colorOn:colorOff,">> CRChanged"); |
| 955 |
ImGui::TextColored(ch->crDirValChanged?colorOn:colorOff,">> CRDirValChanged"); |
| 956 |
ImGui::TextColored(ch->crDirValInit?colorOn:colorOff,">> CRDirValInit"); |
| 957 |
ImGui::TextColored(ch->pcm.isNoteMap?colorOn:colorOff,">> PCMIsNoteMap"); |
| 958 |
ImGui::TextColored(ch->pcm.pause?colorOn:colorOff,">> PCMPause"); |
| 959 |
ImGui::TextColored(ch->pcm.direction?colorOn:colorOff,">> PCMDirection"); |
| 960 |
ImGui::TextColored(ch->pcm.setPos?colorOn:colorOff,">> PCMSetPos"); |
| 961 |
ImGui::TextColored(ch->envelope.k1Slow?colorOn:colorOff,">> EnvK1Slow"); |
| 962 |
ImGui::TextColored(ch->envelope.k2Slow?colorOn:colorOff,">> EnvK2Slow"); |
| 963 |
ImGui::TextColored(ch->overwrite.envelope.k1Slow?colorOn:colorOff,">> EnvK1SlowOverwrite"); |
| 964 |
ImGui::TextColored(ch->overwrite.envelope.k2Slow?colorOn:colorOff,">> EnvK2SlowOverwrite"); |
| 965 |
ImGui::TextColored(ch->overwrite.state.mode?colorOn:colorOff,">> FilterModeOverwrited"); |
| 966 |
ImGui::TextColored(ch->overwrite.state.k1?colorOn:colorOff,">> FilterK1Overwrited"); |
| 967 |
ImGui::TextColored(ch->overwrite.state.k2?colorOn:colorOff,">> FilterK2Overwrited"); |
| 968 |
ImGui::TextColored(ch->overwrite.state.ecount?colorOn:colorOff,">> EnvECountOverwrited"); |
| 969 |
ImGui::TextColored(ch->overwrite.state.lVRamp?colorOn:colorOff,">> EnvLVRampOverwrited"); |
| 970 |
ImGui::TextColored(ch->overwrite.state.rVRamp?colorOn:colorOff,">> EnvRVRampOverwrited"); |
| 971 |
ImGui::TextColored(ch->overwrite.state.k1Ramp?colorOn:colorOff,">> EnvK1RampOverwrited"); |
| 972 |
ImGui::TextColored(ch->overwrite.state.k2Ramp?colorOn:colorOff,">> EnvK2RampOverwrited"); |
| 973 |
break; |
| 974 |
} |
| 975 |
case DIV_SYSTEM_LYNX: { |
| 976 |
DivPlatformLynx::Channel* ch=(DivPlatformLynx::Channel*)data; |
| 977 |
ImGui::Text("> Lynx"); |
| 978 |
COMMON_CHAN_DEBUG; |
| 979 |
ImGui::Text("* FreqDiv:"); |
| 980 |
ImGui::Text(" - clockDivider: %d",ch->fd.clockDivider); |
| 981 |
ImGui::Text(" - backup: %d",ch->fd.backup); |
| 982 |
ImGui::Text("- actualNote: %d",ch->actualNote); |
| 983 |
ImGui::Text("* Sample:"); |
| 984 |
ImGui::Text(" - sample: %d",ch->sample); |
| 985 |
ImGui::Text(" - pos: %d",ch->samplePos); |
| 986 |
ImGui::Text(" - accum: %d",ch->sampleAccum); |
| 987 |
ImGui::Text(" * freq: %d",ch->sampleFreq); |
| 988 |
ImGui::Text(" - base: %d",ch->sampleBaseFreq); |
| 989 |
ImGui::Text("* duty:"); |
| 990 |
ImGui::Text(" - int_feedback7: %d",ch->duty.int_feedback7); |
| 991 |
ImGui::Text(" - feedback: %d",ch->duty.feedback); |
| 992 |
ImGui::Text("- pan: %.2x",ch->pan); |
| 993 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 994 |
COMMON_CHAN_DEBUG_BOOL; |
| 995 |
ImGui::TextColored(ch->pcm?colorOn:colorOff,">> DAC"); |
| 996 |
break; |
| 997 |
} |
| 998 |
case DIV_SYSTEM_PCM_DAC: { |
| 999 |
DivPlatformPCMDAC::Channel* ch=(DivPlatformPCMDAC::Channel*)data; |
| 1000 |
ImGui::Text("> PCM DAC"); |
| 1001 |
COMMON_CHAN_DEBUG; |
| 1002 |
ImGui::Text("* Sample: %d",ch->sample); |
| 1003 |
ImGui::Text(" - dir: %d",ch->audDir); |
| 1004 |
ImGui::Text(" - loc: %d",ch->audLoc); |
| 1005 |
ImGui::Text(" - len: %d",ch->audLen); |
| 1006 |
ImGui::Text(" * pos: %d",ch->audPos); |
| 1007 |
ImGui::Text(" - sub: %d",ch->audSub); |
| 1008 |
ImGui::Text("- wave: %d",ch->wave); |
| 1009 |
ImGui::Text("- panL: %.2x",ch->panL); |
| 1010 |
ImGui::Text("- panR: %.2x",ch->panR); |
| 1011 |
ImGui::Text("- envVol: %.2x",ch->envVol); |
| 1012 |
COMMON_CHAN_DEBUG_BOOL; |
| 1013 |
ImGui::TextColored(ch->useWave?colorOn:colorOff,">> UseWave"); |
| 1014 |
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); |
| 1015 |
break; |
| 1016 |
} |
| 1017 |
case DIV_SYSTEM_K007232: { |
| 1018 |
DivPlatformK007232::Channel* ch=(DivPlatformK007232::Channel*)data; |
| 1019 |
ImGui::Text("> K007232"); |
| 1020 |
COMMON_CHAN_DEBUG; |
| 1021 |
ImGui::Text("- prevFreq: %d",ch->prevFreq); |
| 1022 |
ImGui::Text("* Sample: %d",ch->sample); |
| 1023 |
ImGui::Text(" - pos: %d",ch->audPos); |
| 1024 |
ImGui::Text(" - prevBank: %d",ch->prevBank); |
| 1025 |
ImGui::Text("* panning: %d",ch->panning); |
| 1026 |
ImGui::Text(" - prev: %d",ch->prevPan); |
| 1027 |
ImGui::Text("- resVol: %.2x",ch->resVol); |
| 1028 |
ImGui::Text("- lvol: %.2x",ch->lvol); |
| 1029 |
ImGui::Text("- rvol: %.2x",ch->rvol); |
| 1030 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 1031 |
COMMON_CHAN_DEBUG_BOOL; |
| 1032 |
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged"); |
| 1033 |
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); |
| 1034 |
break; |
| 1035 |
} |
| 1036 |
case DIV_SYSTEM_GA20: { |
| 1037 |
DivPlatformGA20::Channel* ch=(DivPlatformGA20::Channel*)data; |
| 1038 |
ImGui::Text("> GA20"); |
| 1039 |
COMMON_CHAN_DEBUG; |
| 1040 |
ImGui::Text("- prevFreq: %d",ch->prevFreq); |
| 1041 |
ImGui::Text("* Sample: %d",ch->sample); |
| 1042 |
ImGui::Text(" - pos: %d",ch->audPos); |
| 1043 |
ImGui::Text("- resVol: %.2x",ch->resVol); |
| 1044 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 1045 |
COMMON_CHAN_DEBUG_BOOL; |
| 1046 |
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged"); |
| 1047 |
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); |
| 1048 |
break; |
| 1049 |
} |
| 1050 |
case DIV_SYSTEM_SM8521: { |
| 1051 |
DivPlatformSM8521::Channel* ch=(DivPlatformSM8521::Channel*)data; |
| 1052 |
ImGui::Text("> SM8521"); |
| 1053 |
COMMON_CHAN_DEBUG; |
| 1054 |
ImGui::Text("* AntiClick:"); |
| 1055 |
ImGui::Text(" - periodCount: %d",ch->antiClickPeriodCount); |
| 1056 |
ImGui::Text(" - wavePos: %d",ch->antiClickWavePos); |
| 1057 |
ImGui::Text("- wave: %d",ch->wave); |
| 1058 |
COMMON_CHAN_DEBUG_BOOL; |
| 1059 |
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged"); |
| 1060 |
break; |
| 1061 |
} |
| 1062 |
case DIV_SYSTEM_PV1000: { |
| 1063 |
DivPlatformPV1000::Channel* ch=(DivPlatformPV1000::Channel*)data; |
| 1064 |
ImGui::Text("> PV1000"); |
| 1065 |
COMMON_CHAN_DEBUG; |
| 1066 |
COMMON_CHAN_DEBUG_BOOL; |
| 1067 |
break; |
| 1068 |
} |
| 1069 |
case DIV_SYSTEM_K053260: { |
| 1070 |
DivPlatformK053260::Channel* ch=(DivPlatformK053260::Channel*)data; |
| 1071 |
ImGui::Text("> K053260"); |
| 1072 |
COMMON_CHAN_DEBUG; |
| 1073 |
ImGui::Text("* Sample: %d",ch->sample); |
| 1074 |
ImGui::Text(" - pos: %d",ch->audPos); |
| 1075 |
ImGui::Text("- panning: %d",ch->panning); |
| 1076 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 1077 |
COMMON_CHAN_DEBUG_BOOL; |
| 1078 |
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); |
| 1079 |
ImGui::TextColored(ch->reverse?colorOn:colorOff,">> Reverse"); |
| 1080 |
break; |
| 1081 |
} |
| 1082 |
case DIV_SYSTEM_C140: { |
| 1083 |
DivPlatformC140::Channel* ch=(DivPlatformC140::Channel*)data; |
| 1084 |
ImGui::Text("> C140"); |
| 1085 |
COMMON_CHAN_DEBUG; |
| 1086 |
ImGui::Text("* Sample: %d",ch->sample); |
| 1087 |
ImGui::Text(" - pos: %d",ch->audPos); |
| 1088 |
ImGui::Text("- chPanL: %.2x",ch->chPanL); |
| 1089 |
ImGui::Text("- chPanR: %.2x",ch->chPanR); |
| 1090 |
ImGui::Text("- chVolL: %.2x",ch->chVolL); |
| 1091 |
ImGui::Text("- chVolR: %.2x",ch->chVolR); |
| 1092 |
ImGui::Text("- macroVolMul: %.2x",ch->macroVolMul); |
| 1093 |
ImGui::Text("- macroPanMul: %.2x",ch->macroPanMul); |
| 1094 |
COMMON_CHAN_DEBUG_BOOL; |
| 1095 |
ImGui::TextColored(ch->volChangedL?colorOn:colorOff,">> VolChangedL"); |
| 1096 |
ImGui::TextColored(ch->volChangedR?colorOn:colorOff,">> VolChangedR"); |
| 1097 |
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos"); |
| 1098 |
break; |
| 1099 |
} |
| 1100 |
default: |
| 1101 |
ImGui::Text("Unimplemented chip! Help!"); |
| 1102 |
break; |
| 1103 |
} |
| 1104 |
} |