no NOT nice
This commit is contained in:
parent
2eb8099cb4
commit
01c5e9a913
|
@ -460,6 +460,7 @@ struct DivMemoryEntry {
|
||||||
|
|
||||||
struct DivMemoryComposition {
|
struct DivMemoryComposition {
|
||||||
std::vector<DivMemoryEntry> entries;
|
std::vector<DivMemoryEntry> entries;
|
||||||
|
String name;
|
||||||
size_t capacity;
|
size_t capacity;
|
||||||
size_t used;
|
size_t used;
|
||||||
};
|
};
|
||||||
|
|
|
@ -940,11 +940,19 @@ bool DivPlatformSNES::isSampleLoaded(int index, int sample) {
|
||||||
return sampleLoaded[sample];
|
return sampleLoaded[sample];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DivMemoryComposition* DivPlatformSNES::getMemCompo(int index) {
|
||||||
|
if (index!=0) return NULL;
|
||||||
|
return &memCompo;
|
||||||
|
}
|
||||||
|
|
||||||
void DivPlatformSNES::renderSamples(int sysID) {
|
void DivPlatformSNES::renderSamples(int sysID) {
|
||||||
memset(copyOfSampleMem,0,65536);
|
memset(copyOfSampleMem,0,65536);
|
||||||
memset(sampleOff,0,256*sizeof(unsigned int));
|
memset(sampleOff,0,256*sizeof(unsigned int));
|
||||||
memset(sampleLoaded,0,256*sizeof(bool));
|
memset(sampleLoaded,0,256*sizeof(bool));
|
||||||
|
|
||||||
|
memCompo=DivMemoryComposition();
|
||||||
|
memCompo.name="SPC/DSP Memory";
|
||||||
|
|
||||||
// skip past sample table and wavetable buffer
|
// skip past sample table and wavetable buffer
|
||||||
size_t memPos=sampleTableBase+8*4+8*9*16;
|
size_t memPos=sampleTableBase+8*4+8*9*16;
|
||||||
for (int i=0; i<parent->song.sampleLen; i++) {
|
for (int i=0; i<parent->song.sampleLen; i++) {
|
||||||
|
|
|
@ -91,6 +91,7 @@ class DivPlatformSNES: public DivDispatch {
|
||||||
size_t sampleMemLen;
|
size_t sampleMemLen;
|
||||||
unsigned int sampleOff[256];
|
unsigned int sampleOff[256];
|
||||||
bool sampleLoaded[256];
|
bool sampleLoaded[256];
|
||||||
|
DivMemoryComposition memCompo;
|
||||||
unsigned char regPool[0x80];
|
unsigned char regPool[0x80];
|
||||||
SPC_DSP dsp;
|
SPC_DSP dsp;
|
||||||
friend void putDispatchChan(void*,int,int);
|
friend void putDispatchChan(void*,int,int);
|
||||||
|
@ -123,6 +124,7 @@ class DivPlatformSNES: public DivDispatch {
|
||||||
size_t getSampleMemCapacity(int index = 0);
|
size_t getSampleMemCapacity(int index = 0);
|
||||||
size_t getSampleMemUsage(int index = 0);
|
size_t getSampleMemUsage(int index = 0);
|
||||||
bool isSampleLoaded(int index, int sample);
|
bool isSampleLoaded(int index, int sample);
|
||||||
|
const DivMemoryComposition* getMemCompo(int index);
|
||||||
void renderSamples(int chipID);
|
void renderSamples(int chipID);
|
||||||
int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
|
int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags);
|
||||||
void quit();
|
void quit();
|
||||||
|
|
|
@ -29,7 +29,15 @@ void FurnaceGUI::drawMemory() {
|
||||||
}
|
}
|
||||||
if (!memoryOpen) return;
|
if (!memoryOpen) return;
|
||||||
if (ImGui::Begin("Memory Composition",&memoryOpen,globalWinFlags)) {
|
if (ImGui::Begin("Memory Composition",&memoryOpen,globalWinFlags)) {
|
||||||
ImGui::Text("Contents here...");
|
for (int i=0; i<e->song.systemLen; i++) {
|
||||||
|
DivDispatch* dispatch=e->getDispatch(i);
|
||||||
|
for (int j=0; j<4; j++) {
|
||||||
|
const DivMemoryComposition* mc=dispatch->getMemCompo(j);
|
||||||
|
if (mc==NULL) break;
|
||||||
|
|
||||||
|
ImGui::Text("%s: %s",e->getSystemName(e->song.system[i]),mc->name.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_MEMORY;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_MEMORY;
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
Loading…
Reference in a new issue