GBA: update memory composition view
This commit is contained in:
parent
3961f8ef53
commit
cebe47d992
|
|
@ -478,9 +478,9 @@ void DivPlatformGBADMA::renderSamples(int sysID) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sampleLoaded[i]=true;
|
sampleLoaded[i]=true;
|
||||||
|
romMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"PCM",i,sampleOff[i],memPos));
|
||||||
// pad to multiple of 16 bytes
|
// pad to multiple of 16 bytes
|
||||||
memPos=(memPos+15)&~15;
|
memPos=(memPos+15)&~15;
|
||||||
romMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"PCM",i,sampleOff[i],memPos));
|
|
||||||
}
|
}
|
||||||
sampleMemLen=memPos;
|
sampleMemLen=memPos;
|
||||||
romMemCompo.used=sampleMemLen;
|
romMemCompo.used=sampleMemLen;
|
||||||
|
|
@ -500,6 +500,13 @@ int DivPlatformGBADMA::init(DivEngine* p, int channels, int sugRate, const DivCo
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
for (int i=0; i<2; i++) {
|
||||||
|
isMuted[i]=false;
|
||||||
|
oscBuf[i]=new DivDispatchOscBuffer;
|
||||||
|
wtMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Channel %d",i),-1,i*256,i*256));
|
||||||
|
}
|
||||||
|
sampleMem=new signed char[getSampleMemCapacity()];
|
||||||
|
sampleMemLen=0;
|
||||||
romMemCompo=DivMemoryComposition();
|
romMemCompo=DivMemoryComposition();
|
||||||
romMemCompo.name="Sample ROM";
|
romMemCompo.name="Sample ROM";
|
||||||
wtMemCompo=DivMemoryComposition();
|
wtMemCompo=DivMemoryComposition();
|
||||||
|
|
@ -508,13 +515,6 @@ int DivPlatformGBADMA::init(DivEngine* p, int channels, int sugRate, const DivCo
|
||||||
wtMemCompo.capacity=256*2;
|
wtMemCompo.capacity=256*2;
|
||||||
wtMemCompo.memory=(unsigned char*)wtMem;
|
wtMemCompo.memory=(unsigned char*)wtMem;
|
||||||
wtMemCompo.waveformView=DIV_MEMORY_WAVE_8BIT_SIGNED;
|
wtMemCompo.waveformView=DIV_MEMORY_WAVE_8BIT_SIGNED;
|
||||||
for (int i=0; i<2; i++) {
|
|
||||||
isMuted[i]=false;
|
|
||||||
oscBuf[i]=new DivDispatchOscBuffer;
|
|
||||||
wtMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Channel %d",i),-1,i*256,i*256));
|
|
||||||
}
|
|
||||||
sampleMem=new signed char[getSampleMemCapacity()];
|
|
||||||
sampleMemLen=0;
|
|
||||||
setFlags(flags);
|
setFlags(flags);
|
||||||
reset();
|
reset();
|
||||||
return 2;
|
return 2;
|
||||||
|
|
|
||||||
|
|
@ -700,6 +700,7 @@ void DivPlatformGBAMinMod::renderSamples(int sysID) {
|
||||||
sampleOff[i]=memPos;
|
sampleOff[i]=memPos;
|
||||||
memcpy(&sampleMem[memPos],s->data8,actualLength);
|
memcpy(&sampleMem[memPos],s->data8,actualLength);
|
||||||
memPos+=actualLength;
|
memPos+=actualLength;
|
||||||
|
romMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"PCM",i,sampleOff[i],memPos));
|
||||||
// if it's one-shot, add 16 silent samples for looping area
|
// if it's one-shot, add 16 silent samples for looping area
|
||||||
// this should be enough for most cases even though the
|
// this should be enough for most cases even though the
|
||||||
// frequency register can make position jump by up to 256 samples
|
// frequency register can make position jump by up to 256 samples
|
||||||
|
|
@ -708,7 +709,6 @@ void DivPlatformGBAMinMod::renderSamples(int sysID) {
|
||||||
memset(&sampleMem[memPos],0,oneShotLen);
|
memset(&sampleMem[memPos],0,oneShotLen);
|
||||||
memPos+=oneShotLen;
|
memPos+=oneShotLen;
|
||||||
}
|
}
|
||||||
romMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"PCM",i,sampleOff[i],memPos));
|
|
||||||
}
|
}
|
||||||
if (actualLength<length) {
|
if (actualLength<length) {
|
||||||
logW("out of GBA MinMod PCM memory for sample %d!",i);
|
logW("out of GBA MinMod PCM memory for sample %d!",i);
|
||||||
|
|
@ -740,8 +740,8 @@ void DivPlatformGBAMinMod::setFlags(const DivConfig& flags) {
|
||||||
wtMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Channel %d",i),-1,i*256,i*256));
|
wtMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Channel %d",i),-1,i*256,i*256));
|
||||||
}
|
}
|
||||||
for (int i=0; i<(int)mixBufs; i++) {
|
for (int i=0; i<(int)mixBufs; i++) {
|
||||||
mixMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Buffer %d Left",i),-1,i*2048,i*2048));
|
mixMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_ECHO, fmt::sprintf("Buffer %d Left",i),-1,i*2048,i*2048));
|
||||||
mixMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_WAVE_RAM, fmt::sprintf("Buffer %d Right",i),-1,i*2048+1024,i*2048+1024));
|
mixMemCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_ECHO, fmt::sprintf("Buffer %d Right",i),-1,i*2048+1024,i*2048+1024));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -749,6 +749,12 @@ int DivPlatformGBAMinMod::init(DivEngine* p, int channels, int sugRate, const Di
|
||||||
parent=p;
|
parent=p;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
for (int i=0; i<16; i++) {
|
||||||
|
isMuted[i]=false;
|
||||||
|
oscBuf[i]=new DivDispatchOscBuffer;
|
||||||
|
}
|
||||||
|
sampleMem=new signed char[getSampleMemCapacity()];
|
||||||
|
sampleMemLen=0;
|
||||||
romMemCompo=DivMemoryComposition();
|
romMemCompo=DivMemoryComposition();
|
||||||
romMemCompo.name="Sample ROM";
|
romMemCompo.name="Sample ROM";
|
||||||
wtMemCompo=DivMemoryComposition();
|
wtMemCompo=DivMemoryComposition();
|
||||||
|
|
@ -761,12 +767,6 @@ int DivPlatformGBAMinMod::init(DivEngine* p, int channels, int sugRate, const Di
|
||||||
mixMemCompo.capacity=2048*15;
|
mixMemCompo.capacity=2048*15;
|
||||||
mixMemCompo.memory=(unsigned char*)mixBuf;
|
mixMemCompo.memory=(unsigned char*)mixBuf;
|
||||||
mixMemCompo.waveformView=DIV_MEMORY_WAVE_8BIT_SIGNED;
|
mixMemCompo.waveformView=DIV_MEMORY_WAVE_8BIT_SIGNED;
|
||||||
for (int i=0; i<16; i++) {
|
|
||||||
isMuted[i]=false;
|
|
||||||
oscBuf[i]=new DivDispatchOscBuffer;
|
|
||||||
}
|
|
||||||
sampleMem=new signed char[getSampleMemCapacity()];
|
|
||||||
sampleMemLen=0;
|
|
||||||
setFlags(flags);
|
setFlags(flags);
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue