commit
7d684654fc
|
@ -13,3 +13,4 @@ test/songs/
|
||||||
test/delta/
|
test/delta/
|
||||||
test/result/
|
test/result/
|
||||||
.vs/
|
.vs/
|
||||||
|
CMakeSettings.json
|
|
@ -222,15 +222,19 @@ struct DivRegWrite {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DivDispatchOscBuffer {
|
struct DivDispatchOscBuffer {
|
||||||
|
bool follow;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
unsigned short needle;
|
unsigned short needle;
|
||||||
unsigned short readNeedle;
|
unsigned short readNeedle;
|
||||||
|
unsigned short followNeedle;
|
||||||
short data[65536];
|
short data[65536];
|
||||||
|
|
||||||
DivDispatchOscBuffer():
|
DivDispatchOscBuffer():
|
||||||
|
follow(true),
|
||||||
rate(65536),
|
rate(65536),
|
||||||
needle(0),
|
needle(0),
|
||||||
readNeedle(0) {
|
readNeedle(0),
|
||||||
|
followNeedle(0) {
|
||||||
memset(data,0,65536*sizeof(short));
|
memset(data,0,65536*sizeof(short));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -149,8 +149,7 @@ void FurnaceGUI::drawDebug() {
|
||||||
ImGui::Text("%d: <NULL!>",i);
|
ImGui::Text("%d: <NULL!>",i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ImGui::Text("%d: %s",i,sample->name.c_str());
|
if (ImGui::TreeNode(fmt::sprintf("%d: %s",i,sample->name).c_str())) {
|
||||||
ImGui::Indent();
|
|
||||||
ImGui::Text("rate: %d",sample->rate);
|
ImGui::Text("rate: %d",sample->rate);
|
||||||
ImGui::Text("centerRate: %d",sample->centerRate);
|
ImGui::Text("centerRate: %d",sample->centerRate);
|
||||||
ImGui::Text("loopStart: %d",sample->loopStart);
|
ImGui::Text("loopStart: %d",sample->loopStart);
|
||||||
|
@ -183,7 +182,61 @@ void FurnaceGUI::drawDebug() {
|
||||||
ImGui::Text("offSU: %x",sample->offSU);
|
ImGui::Text("offSU: %x",sample->offSU);
|
||||||
|
|
||||||
ImGui::Text("samples: %d",sample->samples);
|
ImGui::Text("samples: %d",sample->samples);
|
||||||
ImGui::Unindent();
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
if (ImGui::TreeNode("Oscilloscope Debug")) {
|
||||||
|
int c=0;
|
||||||
|
for (int i=0; i<e->song.systemLen; i++) {
|
||||||
|
DivSystem system=e->song.system[i];
|
||||||
|
if (e->getChannelCount(system)>0) {
|
||||||
|
if (ImGui::TreeNode(fmt::sprintf("%d: %s",i,e->getSystemName(system)).c_str())) {
|
||||||
|
if (ImGui::BeginTable("OscilloscopeTable",4,ImGuiTableFlags_Borders|ImGuiTableFlags_SizingStretchSame)) {
|
||||||
|
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);
|
||||||
|
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed);
|
||||||
|
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch);
|
||||||
|
ImGui::TableSetupColumn("c3",ImGuiTableColumnFlags_WidthStretch);
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Channel");
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Follow");
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Address");
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("Data");
|
||||||
|
|
||||||
|
for (int j=0; j<e->getChannelCount(system); j++, c++) {
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
// channel
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("%d",j);
|
||||||
|
// follow
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Checkbox(fmt::sprintf("##%d_OSCFollow_%d",i,c).c_str(),&e->getOscBuffer(c)->follow);
|
||||||
|
// address
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
int needle=e->getOscBuffer(c)->follow?e->getOscBuffer(c)->needle:e->getOscBuffer(c)->followNeedle;
|
||||||
|
ImGui::BeginDisabled(e->getOscBuffer(c)->follow);
|
||||||
|
if (ImGui::InputInt(fmt::sprintf("##%d_OSCFollowNeedle_%d",i,c).c_str(),&needle,1,100)) {
|
||||||
|
e->getOscBuffer(c)->followNeedle=MIN(MAX(needle,0),65535);
|
||||||
|
}
|
||||||
|
ImGui::EndDisabled();
|
||||||
|
// data
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("%d",e->getOscBuffer(c)->data[needle]);
|
||||||
|
}
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ImGui::Text("%d: <NULL!>",i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue